Jump to content
  • Advertisement
Sign in to follow this  
Murdocki

Private method returning handle

This topic is 2552 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:


#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;
}


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
Advertisement
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
i had 2.20.2 so didnt think that was too outdated but upgraded to 2.21.0 and it's gone so that was it after all, cheers for the hint

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!