Warning 202. - 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. (
/showthread.php?tid=320480)
Warning 202. -
TrueCoppa - 23.02.2012
I'm getting this warning when I try and make an IRC setscore command (I made the standard ingame one fine)
C:\Users\TrueCoppa\pawno\SFCRRPG.pwn(1347

: warning 202: number of arguments does not match definition
pawn Код:
SendClientMessage(setid,COLOR_ADMIN,"[SCORE SET] Your score has been set to %d by an administrator.",score);
Is the line in question
Re: Warning 202. -
mineralo - 23.02.2012
you need use a string for a text no const
try this
pawn Код:
new string[256];
format(string,sizeof(string),"[SCORE SET] Your score has been set to %d by an administrator.",score);
SendClientMessage(setid,COLOR_ADMIN,string);
Re: Warning 202. -
TrueCoppa - 23.02.2012
Quote:
Originally Posted by mineralo
you need use a string for a text no const
try this
pawn Код:
new string[256]; format(string,sizeof(string),"[SCORE SET] Your score has been set to %d by an administrator.",score); SendClientMessage(setid,COLOR_ADMIN,string);
|
Of course!
Thanks for the help.
Re: Warning 202. -
Mario™ - 23.02.2012
Its only a Warning It doesnt Really Matters
Re: Warning 202. -
TrueCoppa - 23.02.2012
Ahah but now I have another issue. The script compiles fine but
06:56:21] <~[TT]TrueCoppa> !setscore 1 1
[06:56:22] <&TTCNR2> 2ERROR: 48 is not an active ID.
[06:56:25] <~[TT]TrueCoppa> wat
[06:56:33] <~[TT]TrueCoppa> !setscore 0 1
[06:56:34] <&TTCNR1> 2ERROR: 48 is not an active ID.
No matter what I do it just does ID 48.
pawn Код:
IRCCMD:setscore(botid, channel[], user[], host[], params[])
{
if (IRC_IsOp(botid, channel, user))
{
new setid;
new score;
new string[128];
if(sscanf(params, "us[100]", setid, score))
{
format(string, sizeof(string), "USAGE: !setscore (ID) (Score)");
Say(channel,string);
return 1;
}
if(!IsPlayerConnected(setid))
{
format(string, sizeof(string), "2ERROR: \2;%d\2; is not an active ID.", setid);
Say(channel,string);
return 1;
}
format(string, sizeof(string), "You have successfully set %s(%d)'s score to %s",PlayerName(setid),setid,score);
Say(channel,string);
SetPlayerScore(setid,score);
dUserSetINT(PlayerName(setid)).("Score", score);
format(string, sizeof(string), "[SCORE SET] Your score has been set to %d by an administrator.",score);
SendClientMessage(setid,COLOR_ADMIN,string);
return 1;
}
return 1;
}
Re: Warning 202. -
MP2 - 23.02.2012
Quote:
Originally Posted by Mario™
Its only a Warning It doesnt Really Matters
|
Do you have the latest sscanf version?
Re: Warning 202. -
TrueCoppa - 23.02.2012
Quote:
Originally Posted by MP2
Do you have the latest sscanf version?
|
Yes I do
Re: Warning 202. -
MP2 - 23.02.2012
Shouldn't it be "ui"? Score isn't a string.