Help: 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: Help: warning 202: number of arguments does not match definition (
/showthread.php?tid=541183)
Help: warning 202: number of arguments does not match definition -
KingPersona - 10.10.2014
hello
i have problem , when i compile i get warning
Код:
(18254) : warning 202: number of arguments does not match definition
this line :
Код:
if(!response) return OnPlayerCommandPerformed(playerid, "/obj");
full
pawn Код:
case 6566:
{
if(response)
{
if(!response) return OnPlayerCommandPerformed(playerid, "/obj");
new Float:X, Float:Y, Float:Z;
new model = strval(inputtext);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 6566, DIALOG_STYLE_INPUT, "Editor", "Enter the ID of the object:", "Finish", "Back");
if(strlen(inputtext) > 5) return ShowPlayerDialog(playerid, 6566, DIALOG_STYLE_INPUT, "Editor", "Enter the ID of the object:", "Finish", "Back");
GetPlayerPos(playerid, X, Y, Z);
new Object = CreateObject(model, X + 0.0, Y + 3.0, Z + 1.0, 0.0, 0.0, 0.0);
EditObject(playerid, Object);
}
return true;
}
Re: Help: warning 202: number of arguments does not match definition -
Evocator - 10.10.2014
Its
Код:
OnPlayerCommandPerformed(playerid, cmdtext[], success)
For your code, replace
pawn Код:
if(!response) return OnPlayerCommandPerformed(playerid, "/obj");
with
pawn Код:
if(!response) return cmd_obj(playerid, "");
read zcmd's include thread or search for tutos, they are many.
https://sampforum.blast.hk/showthread.php?tid=91354