Private method returning handle

Started by
2 comments, last by Murdocki 12 years, 8 months ago
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
Advertisement
Sounds like it is a bug in AngelScript. I'll have a look at it.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

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.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

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

This topic is closed to new replies.

Advertisement