Error - 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: Error (
/showthread.php?tid=473934)
Error -
newbie scripter - 05.11.2013
pawn Код:
new ID;
new Level;
if(sscanf(params, "dd[5]", ID, Level)) return SendClientMessage(playerid, 0x33AA33AA, "Usage: /setlevel [playerid] [Level]"); // error line
Error: " : error 035: argument type mismatch (argument 1)"
whats is the mistake, im making a simple setlevel cmd
Re: Error -
AlonzoTorres - 05.11.2013
Nvm.
Re: Error -
newbie scripter - 05.11.2013
acctually i started without that [5] and i used ii, later i tried with this. Fail
Re: Error -
AlonzoTorres - 05.11.2013
Well the problem is that you've used a different datatype when handling ID or Level. I don't think the error is on this line, show me the full command instead.
Re: Error -
newbie scripter - 05.11.2013
pawn Код:
CMD:setlevel (playerid, params)
{
if (PlayerData [playerid] [ALevel] < 5 || !IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 0xAFAFAFAA, "Server: Unknown Command");
return 0;
}
new ID;
new Level;
if(sscanf(params, "dd", ID, Level))
{
SendClientMessage(playerid, 0x33AA33AA, "Usage: /setlevel [playerid] [Level]");
}
if(Level > 10 || Level < 0)
{
SendClientMessage(playerid, 0x33AA33AA, "Error:Select a Level between 0 an 10");
}
if(ID == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, 0x33AA33AA, "Error:Player Not Connected");
}
PlayerData [ID] [ALevel] = Level;
return 1;
}
im a nub. did Enum
Re: Error -
Ada32 - 05.11.2013
Quote:
Originally Posted by AlonzoTorres
Well the problem is that you've used a different datatype when handling ID or Level. I don't think the error is on this line, show me the full command instead.
|
no datatypes. but yes, the error isn't coming from any of those lines.
Re: Error -
newbie scripter - 05.11.2013
not even the one i posted above??
Re: Error -
Ada32 - 05.11.2013
Код:
CMD:setlevel (playerid, params[])
Re: Error -
AlonzoTorres - 05.11.2013
Was just about to post, good hunt.
Re: Error -
newbie scripter - 05.11.2013
facepalm. i forgot to add []