01.09.2013, 15:31
Quote:
Thanks it now perfectly works
Would you mind explaining me how though? I am just curious why I can't do [] with an ID. |
new i; will create a variable.
new i[5] will create 5 variables but with the same identifier.It is accessed by i[0] for the 1st element.
In your code if you declare id[50] and pass it on as a parameter, the compiler would end up not knowing what to do since it requires just one variable(and you are giving 50;obviously, what could it do).
The ultimate change required is give just one variable instead of multiple and it can be solved by new id; or by giving just one variable by i[1].
If you have never heard of arrays or did not understand what I told, visit THIS and start learning the PAWN language.