argument type mismatch
#1

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

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)