script help
#2

Quote:
Originally Posted by GeneralAref
Посмотреть сообщение
i have this but given me 2 error.
Код:
CMD:attp(playerid, params[])
{
    new gteam[MAX_PLAYERS], adminname[MAX_PLAYER_NAME], Team, Float:x, Float:y, Float:z;
    if(PlayerInfo[playerid][pAdmin] >=4 || IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "ui", Team)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /attp [Team id]");
        if (Team > 1 || Team < 0 ) return SendClientMessage(playerid, COLOR_RED,"[ERROR]: Valid world number: 0-1!");
    	GetPlayerTeam(Team, gteam, sizeof(Team));
		GetPlayerName(playerid, adminname, sizeof(adminname));
        new str[128];
        format(str,128,"%s [ID %d] has teleported %i Team!",adminname, playerid, Team);
        SendClientMessageToAll(COLOR_BLUE,str);
        GetPlayerPos(playerid, x, y, z);
        if(GetPlayerTeam(playerid) == Team)
	    {
            SetPlayerPos(playerid, x, y, z);
            TogglePlayerControllable(playerid, 0);
	    }
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!");
}
Код:
C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition
C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition
can you fix it?
First of all, you are asking for 2 parameters but defining 1
PHP код:
if(sscanf(params"ui"Team)) 
Change that to just u or i, depends what you are looking for.

Also, which one is the error line
Reply


Messages In This Thread
script help - by GeneralAref - 15.12.2015, 14:35
Re: script help - by TwinkiDaBoss - 15.12.2015, 14:38
Re: script help - by AbyssMorgan - 15.12.2015, 14:42
Re: script help - by GeneralAref - 15.12.2015, 14:43
Re: script help - by GeneralAref - 15.12.2015, 14:45
Re: script help - by GeneralAref - 16.12.2015, 09:57
Re: script help - by GeneralAref - 16.12.2015, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)