SA-MP Forums Archive
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: Type mismatch (/showthread.php?tid=346654)



Type mismatch - MechaTech - 29.05.2012

I have 1 error in my script but i can't find the problem.
Error:
Код:
W:\Users\Magdy\Desktop\Server 3.0e\filterscripts\UMT-AdminSystem.pwn(978) : error 035: argument type mismatch (argument 1)
Code:
pawn Код:
CMD:freeze(playerid, params)
{
    new string[256], id, Seconds, Reason[256], Target[MAX_PLAYER_NAME], Admin[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_RED, "[ERROR] You've to be an level 3 vip to use this command.");
Line 978: >>   else if(sscanf(params,"uis[256]", id, Seconds, Reason)) return SendClientMessage(playerid, COLOR_GREY, "[SYNTAX] Usage: /freeze [playerid] [seconds] [Reason]");
    else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED,"[ERROR] That player isn't connected.");
    else if(id == playerid)SendClientMessage(playerid, COLOR_RED,"[ERROR] You cannot freeze yourself!");
    else if(PlayerInfo[id][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"[ERROR] You cant perform this on admins who are higher than you, or on the same level.");
    else {
    TogglePlayerControllable(playerid, 0);
    SetTimerEx("Unfreeze", Seconds*1000, false, "i", id);
    GetPlayerName(id, Target, MAX_PLAYER_NAME);
    GetPlayerName(playerid ,Admin, MAX_PLAYER_NAME);
    format(string,sizeof(string),"[FREEZE] %s has been frozen for %i by %s [Reason: %s]",Target, Seconds, Admin, Reason);
    SendClientMessageToAll(COLOR_RED, string);
    }
    return 1;
}



Re: Type mismatch - zbt - 29.05.2012

CMD:freeze(playerid, params[])


Re: Type mismatch - MechaTech - 29.05.2012

Quote:
Originally Posted by zbt
Посмотреть сообщение
CMD:freeze(playerid, params[])
oh thanks, i didn't look at that xD.