SA-MP Forums Archive
Params?? - 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: Params?? (/showthread.php?tid=68295)



Params?? - introzen - 08.03.2009

Okey, I must be very stupid but... What does this mean? :S

Код:
C:\Documents and Settings\HP_Дgaren\Skrivbord\SAMP\samp server\gamemodes\EQRP.pwn(953) : error 033: array must be indexed (variable "params")
C:\Documents and Settings\HP_Дgaren\Skrivbord\SAMP\samp server\gamemodes\EQRP.pwn(974) : error 033: array must be indexed (variable "params")
C:\Documents and Settings\HP_Дgaren\Skrivbord\SAMP\samp server\gamemodes\EQRP.pwn(976) : error 033: array must be indexed (variable "params")



Re: Params?? - [RP]Rav - 08.03.2009

033 array must be indexed (variable name)
An array as a whole cannot be used in a expression; you must
indicate an element of the array between square brackets.

http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf (appendix A)


Re: Params?? - introzen - 08.03.2009

............................


Re: Params?? - Zoopaman - 08.03.2009

make somestuffwhatever into somestuff[whatever]


Re: Params?? - [RP]Rav - 09.03.2009

Alright, to explain it a bit, say you have an array that looks like this

pawn Код:
new array[] = { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
what you're trying to do is something like this (I think)

pawn Код:
if (array == 5)
and what you should be doing is

pawn Код:
if (array[5] == 4)