Error help - 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: Error help (
/showthread.php?tid=154489)
Error help -
willsuckformoney - 14.06.2010
i need fix theses warnings so my GM will load
Код:
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(200) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(200) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(206) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(206) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(212) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(212) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(218) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(218) : warning 202: number of arguments does not match definition
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(222) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
9 Warnings.
Thoses warnings are in these lines
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/lgate", cmdtext, true) == 0)
{
lgate = MoveObject(lgate,-825.0629,534.3886,4.4332,0.000000,0.000000,90);
SendClientMessage(playerid, COLOR_BRIGHTRED, "Gate Opened enjoy!.");
return 1;
}
if(strcmp("/lclose", cmdtext, true) == 0)
{
lgate = MoveObject(lgate,-824.91625976563,526.78576660156,4.8442096710205,0.000000,0.000000,90);
SendClientMessage(playerid, COLOR_BRIGHTRED, "Gate Closed");
return 1;
}
if(strcmp("/rgate", cmdtext, true) == 0)
{
rgate = MoveObject(rgate,-827.23461914063,492.59222412109,4.7193446159363,0.000000,0.000000,90);
SendClientMessage(playerid, COLOR_BRIGHTRED, "Gate Opened.");
return 1;
}
if(strcmp("/rclose", cmdtext, true) == 0)
{
rgate = MoveObject(rgate,-825.23461914063,492.59222412109,4.7193446159363,0.000000,0.000000,90);
SendClientMessage(playerid, COLOR_BRIGHTRED, "Gate Closed.");
return 1;
}
}
Please help!
Re: Error help -
Mina - 14.06.2010
number of arguments does not match definition :
Function(int a, int b, int c){
return a+b+c;
}
Seems you used Function(1, 2) or you used Function(1, 2, 3, 4);, but you must use Function(1, 2, 3);
And function "OnPlayerCommandText" should return a value:
In the last line which is a }
Before it write return 0/1;