bug in IsArrayDecl. String was:

Previous topic - Next topic

MrTAToad

For some reason the code :

Code (glbasic) Select
self.spots[index%].winningPlayerIndex%=players[self.findPlayerIndex(currentPlayerIndex%,players[])].ReturnPlayerIndex()

generates the following compiler error :

bug in IsArrayDecl. String was:
[self.findPlayerIndex(currentPlayerIndex%

Kitty Hello

 :noggin:
Code (glbasic) Select

LOCAL pindex% = self.findPlayerIndex(currentPlayerIndex%,players[])
self.spots[index%].winningPlayerIndex% = players[pindex%].ReturnPlayerIndex()

does that work?

If you get that error, you found one of my favorite bugs in the GPC. The alternative of this error would be a crash at that point :S. I'm so sorry.

MrTAToad

Yes, I think I've come across it before.  I usually simply the expression like that.