Sign in to follow this  

Private method returning handle

This topic is 2337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having problems with having a private method returning a handle. The error i'm getting is: "(14, 3) : Can't return value when return type is 'void'"
I've searched the documentation but did not find anything that even hints towards this error so i thought i might aswell ask here.

The script i'm using is:
[code]

#include "./GameScripts/GameObject.as"

class Playfield
{
Playfield( uint8 rowCount, uint8 colCount )
{
this.rowCount = rowCount;
this.colCount = colCount;
cells.resize( rowCount * colCount );
}

private GameObject@ Cell( uint8 row, uint8 col )
{
return cells[ colCount * row + col ];
}

private GameObject@[] cells;
private uint8 rowCount;
private uint8 colCount;
}
[/code]

when i'm removing the private keyword from the "Cell" method it compiles just fine. Anyone knows where this error comes from and how to fix it?
Thanks in Advance,

Murdocki

Share this post


Link to post
Share on other sites
I haven't been able to reproduce this problem. Which version of AngelScript are you using?


Version 2.20.3 released in May this year had a bug fix that may be related to this, if you're using an older version, then I suggest you upgrade.

Share this post


Link to post
Share on other sites

This topic is 2337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this