argument type mismatch - 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 (
/showthread.php?tid=488308)
argument type mismatch -
Blademaster680 - 17.01.2014
Error: (13837) : error 035: argument type mismatch (argument 1)
Код:
CMD:time(playerid, params[])
{
new choice;
if(sscanf(params, "s", choice))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /time [choice]");
SendClientMessage(playerid, -1, "Choices: Jail | Payday");
return 1;
}
if(strcmp(choice, "timer", true) == 0)
{
new str[126];
if(PlayerInfo[playerid][pJail] < 1) return SendClientMessage(playerid, -1, "You are not in prison.");
format(str, 128, "You have %i minutes left of prison.", PlayerInfo[playerid][pJail]);
SendClientMessage(playerid, -1, str);
}
if(strcmp(choice, "payday", true) == 0)
{
new str[128];
format(str, sizeof(str), "Next payday in %i minutes.", PayDayCount);
}
return 1;
}
Line of error:
Код:
if(strcmp(choice, "timer", true) == 0)
Re: argument type mismatch -
Konstantinos - 17.01.2014
pawn Код:
CMD:time(playerid, params[])
{
if (isnull(params))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /time [choice]");
SendClientMessage(playerid, -1, "Choices: Jail | Payday");
return 1;
}
if (!strcmp(params, "jail", true))
{
if(PlayerInfo[playerid][pJail] < 1) return SendClientMessage(playerid, -1, "You are not in prison.");
new str[44];
format(str, sizeof (str), "You have %i minutes left of prison.", PlayerInfo[playerid][pJail]);
SendClientMessage(playerid, -1, str);
}
if (!strcmp(params, "payday", true))
{
new str[35];
format(str, sizeof (str), "Next payday in %i minutes.", PayDayCount);
SendClientMessage(playerid, -1, str);
}
else SendClientMessage(playerid, -1, "Choices: Jail | Payday");
return 1;
}