SA-MP Forums Archive
Warning 202: Number of arguments does not match definition - 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)
+--- Thread: Warning 202: Number of arguments does not match definition (/showthread.php?tid=627603)



Warning 202: Number of arguments does not match definition - jremi - 29.01.2017

Hello, stumbled upon this warning as I compiled a gamemode.
warning 202: number of arguments does not match definition
This is the line of code the warning comes from.
Код:
SetPlayerPos(playerid, RandomAPrison[rand][0], RandomAPrison[rand][1],RandomAPrison[rand][2], RandomAPrison[rand][3], RandomAPrison[rand][4],RandomAPrison[rand][5], RandomAPrison[rand][6], RandomAPrison[rand][7],RandomAPrison[rand][8], RandomAPrison[rand][9], RandomAPrison[rand][10],RandomAPrison[rand][11], RandomAPrison[rand][12], RandomAPrison[rand][13]);



Re: Warning 202: Number of arguments does not match definition - Jefff - 29.01.2017

https://sampwiki.blast.hk/wiki/SetPlayerPos


Respuesta: Warning 202: Number of arguments does not match definition - Eloy - 29.01.2017

Remember Arguments this function
PHP код:
GetPlayerPos(playeridFloat:x Float:yFloat:z); 



Re: Warning 202: Number of arguments does not match definition - jamesbond007 - 30.01.2017

wtf are u trying to do? position a player in the 14th dimension or something? lol


Re: Warning 202: Number of arguments does not match definition - RyderX - 30.01.2017

C'mon dude,

PHP код:
SetPlayerPos(playeridRandomAPrison[rand][0], RandomAPrison[rand][1],RandomAPrison[rand][2], RandomAPrison[rand][3], RandomAPrison[rand][4],RandomAPrison[rand][5], RandomAPrison[rand][6], RandomAPrison[rand][7],RandomAPrison[rand][8], RandomAPrison[rand][9], RandomAPrison[rand][10],RandomAPrison[rand][11], RandomAPrison[rand][12], RandomAPrison[rand][13]); 
It's
PHP код:
SetPlayerPos(playeridFloat:x,Float:y,Float:z); 
you added a lot of wrong arguments, from:
PHP код:
RandomAPrison[rand][3], RandomAPrison[rand][4],RandomAPrison[rand][5], RandomAPrison[rand][6], RandomAPrison[rand][7],RandomAPrison[rand][8], RandomAPrison[rand][9], RandomAPrison[rand][10],RandomAPrison[rand][11], RandomAPrison[rand][12], RandomAPrison[rand][13
The only advantages on SetPlayerPos is just X,Y,Z but you added more than them..