argument type mismatch (argument 1)
#1

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)
Reply
#2

SetWorldTime uses a parameter hour as an integer, not a string.
Reply
#3

Like this?
Код:
	if (strcmp("/settime", cmdtext, true, 10) == 0)
	{
	    new int: cmdtext;
		SetWorldTime(cmdtext);
		return 1;
	}
	return 0;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)