SA-MP Forums Archive
Problem with array subscript in enum - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with array subscript in enum (/showthread.php?tid=241242)



Problem with array subscript in enum - Jochemd - 17.03.2011

Hello,

pawn Код:
if(pickupid == PickupInfo[i][PickupID[0]])
I got this in my script. In the enum there is "PickupID[2]". I can write in this array. Only checking with the subscript is not working, this are the errors:

Код:
DynamicPickups.pwn(43) : error 028: invalid subscript (not an array or too many subscripts): "PickupID"
DynamicPickups.pwn(43) : warning 215: expression has no effect
DynamicPickups.pwn(43) : error 001: expected token: ";", but found "]"
DynamicPickups.pwn(43) : error 029: invalid expression, assumed zero
DynamicPickups.pwn(43) : fatal error 107: too many error messages on one line
Any idea why?

Jochem


Re: Problem with array subscript in enum - DerrydBrincat - 07.05.2011

Yeah, I got this too.


Re: Problem with array subscript in enum - Retardedwolf - 07.05.2011

if(pickupid == PickupInfo[i][PickupID[0])


Re: Problem with array subscript in enum - [DM]Kane - 07.05.2011

Jochemd, what are trying to do? And what is 'i' here?


Re: Problem with array subscript in enum - [KO]KillerThriller - 07.05.2011

My conclusion:
You have an array in a enum?