SA-MP Forums Archive
wat does warning 202 mean? - 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: wat does warning 202 mean? (/showthread.php?tid=65192)



wat does warning 202 mean? - [MLT]Marco - 10.02.2009

i always get errors when scripting but i fixed them but now i have 5 warnings: warning 202: number of arguments does not match definition

help me out with it plz




Re: wat does warning 202 mean? - yom - 10.02.2009

Read PAWN doc.


Re: wat does warning 202 mean? - [RP]Rav - 10.02.2009

it means you're using the wrong amount of arguments for a function, for example, the function is like this:
Код:
 
function(param, param, param);
your error is that you do not define all params, or too many, either one of these:
Код:
function(param, param); // not enough params defined!
function(param, param, param, param); // too many!



Re: wat does warning 202 mean? - [MLT]Marco - 10.02.2009

1349:return SetVehiclePos(vehicleid,558,2235.4656,1964.6519,31 .5433,267.6731,116.1),

1353: SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7 797,267.783;



Re: wat does warning 202 mean? - ғαιιοцт - 10.02.2009

Quote:
Originally Posted by [MLT
Marco ]
1349:return SetVehiclePos(vehicleid,558,2235.4656,1964.6519,31 .5433,267.6731,116.1),

1353: SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7 797,267.783;
Код:
return SetVehiclePos(558, 2235.4656, 1964.6519, 31.5433, 267.6731);

SetPlayerPos(playerid, 2235.0945, 1966.3348, 31.7797);
SetPlayerAngle(playerid, 267.7838);
https://sampwiki.blast.hk/wiki/SetPlayerPos
&
https://sampwiki.blast.hk/wiki/SetVehiclePos


Re: wat does warning 202 mean? - [MLT]Marco - 10.02.2009

Код:
//Command: /drift9
if(strcmp(cmdtext, "/drift9", true)==0)
{
 new vehicleid = GetPlayerVehicleID(playerid);
 new State = GetPlayerState(playerid);
 format(string, sizeof(string), "%s warped to Las Venturas Parking Lot ! ( /drift9 )", player);
 SendClientMessageToAll(YELLOW, string);
 if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
 {
return SetVehiclePos(playerid, 558, 2235.4656, 1964.6519, 31.5433, 267.6731);
   GameTextForPlayer(playerid, "~w~", 5000, 5);

 }
 SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7797);
	SetPlayerAngle(playerid, 267.7838);
  GameTextForPlayer(playerid, "~w~", 5000, 5);

return 1;
}
and it still didnt work
can someone do it for me coz i tried everything


Re: wat does warning 202 mean? - ғαιιοцт - 10.02.2009

Quote:
Originally Posted by [MLT
Marco ]
Код:
//Command: /drift9
if(strcmp(cmdtext, "/drift9", true)==0)
{
 new vehicleid = GetPlayerVehicleID(playerid);
 new State = GetPlayerState(playerid);
 format(string, sizeof(string), "%s warped to Las Venturas Parking Lot ! ( /drift9 )", player);
 SendClientMessageToAll(YELLOW, string);
 if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
 {
return SetVehiclePos(playerid, 558, 2235.4656, 1964.6519, 31.5433, 267.6731);
  GameTextForPlayer(playerid, "~w~", 5000, 5);

 }
 SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7797);
	SetPlayerAngle(playerid, 267.7838);
 GameTextForPlayer(playerid, "~w~", 5000, 5);

return 1;
}
and it still didnt work
can someone do it for me coz i tried everything
pawn Код:
if(strcmp(cmdtext, "/drift9", true)==0)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    new State = GetPlayerState(playerid);
    format(string, sizeof(string), "%s warped to Las Venturas Parking Lot ! ( /drift9 )", player);
    SendClientMessageToAll(YELLOW, string);
    if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
    {
        GameTextForPlayer(playerid, "~w~", 5000, 5);
        return SetVehiclePos(558, 2235.4656, 1964.6519, 31.5433, 267.6731);
    }
    SetPlayerPos(playerid, 2235.0945, 1966.3348, 31.7797);
    SetPlayerAngle(playerid, 267.7838);
    GameTextForPlayer(playerid, "~w~", 5000, 5);

    return 1;
}
sorry, I was still editing, pressed the 'Save' button to fast


Re: wat does warning 202 mean? - SilentMouse - 10.02.2009

Quote:
Originally Posted by [MLT
Marco ]
Код:
//Command: /drift9
if(strcmp(cmdtext, "/drift9", true)==0)
{
 new vehicleid = GetPlayerVehicleID(playerid);
 new State = GetPlayerState(playerid);
 format(string, sizeof(string), "%s warped to Las Venturas Parking Lot ! ( /drift9 )", player);
 SendClientMessageToAll(YELLOW, string);
 if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
 {
return SetVehiclePos(playerid, 558, 2235.4656, 1964.6519, 31.5433, 267.6731);
  GameTextForPlayer(playerid, "~w~", 5000, 5);

 }
 SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7797);
	SetPlayerAngle(playerid, 267.7838);
 GameTextForPlayer(playerid, "~w~", 5000, 5);

return 1;
}
and it still didnt work
can someone do it for me coz i tried everything
SetVehiclePos(vehicleid, float, float:y, float:z);
SetVehiclePos(playerid, 558, 2235.4656, 1964.6519, 31.5433, 267.6731);

SetPlayerPos(playerid, float, float:y, float:z);
SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7 797);


Re: wat does warning 202 mean? - yom - 10.02.2009

Sure you tried everything -_- you don't even read replies lol.


Re: wat does warning 202 mean? - ғαιιοцт - 10.02.2009

Quote:
Originally Posted by SnowFlake
Quote:
Originally Posted by [MLT
Marco ]
Код:
//Command: /drift9
if(strcmp(cmdtext, "/drift9", true)==0)
{
 new vehicleid = GetPlayerVehicleID(playerid);
 new State = GetPlayerState(playerid);
 format(string, sizeof(string), "%s warped to Las Venturas Parking Lot ! ( /drift9 )", player);
 SendClientMessageToAll(YELLOW, string);
 if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
 {
return SetVehiclePos(playerid, 558, 2235.4656, 1964.6519, 31.5433, 267.6731);
  GameTextForPlayer(playerid, "~w~", 5000, 5);

 }
 SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7797);
	SetPlayerAngle(playerid, 267.7838);
 GameTextForPlayer(playerid, "~w~", 5000, 5);

return 1;
}
and it still didnt work
can someone do it for me coz i tried everything
SetVehiclePos(vehicleid, float, float:y, float:z);
SetVehiclePos(playerid, 558, 2235.4656, 1964.6519, 31.5433, 267.6731);

SetPlayerPos(playerid, float, float:y, float:z);
SetPlayerPos(playerid,299,2235.0945,1966.3348,31.7797);
delete the 299 and it's complete
oh and the "playerid," to in SetVehiclePos
did you copy from my post? ><