argument type mismatch (argument 1) - 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: argument type mismatch (argument 1) (
/showthread.php?tid=472420)
argument type mismatch (argument 1) -
Arnoo - 28.10.2013
Hey.
Im trying to make a command to change the time.
This is my code.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/settime", cmdtext, true, 10) == 0)
{
SetWorldTime(cmdtext);
return 1;
}
return 0;
}
This is the error.
Код:
C:\Users\Arno\Desktop\Sample server\gamemodes\test.pwn(94) : error 035: argument type mismatch (argument 1)
Re: argument type mismatch (argument 1) -
Konstantinos - 28.10.2013
SetWorldTime uses a parameter
hour as an integer, not a string.
Re: argument type mismatch (argument 1) -
Arnoo - 28.10.2013
Like this?
Код:
if (strcmp("/settime", cmdtext, true, 10) == 0)
{
new int: cmdtext;
SetWorldTime(cmdtext);
return 1;
}
return 0;