error 035: argument type mismatch (argument 1)
#7

Quote:
Originally Posted by Tomer!.$
Посмотреть сообщение
Thanks it now perfectly works
Would you mind explaining me how though? I am just curious why I can't do [] with an ID.
[] are used to store multiple data in a single identifier.They are known as arrays.

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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)