i need help with this command Please
#1

Guys i am having hard times fixing these please anyone can help me



Код:
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\dan.pwn(446) : error 001: expected token: ";", but found "}"
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\dan.pwn(448) : warning 225: unreachable code
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\dan.pwn(448) : warning 217: loose indentation
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\dan.pwn(450) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\dan.pwn(450) : error 017: undefined symbol "cmd_ahelp"
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\dan.pwn(450) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\SAMP Server\gamemodes\dan.pwn(450) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Код:
CMD:setadmin(playerid, params[])
{
	if(PInfo[playerid][pAdmin] >= 5)
	{
	    new victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id;
	    if (sscanf(params, "ui", id, admlvl)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /setadmin [id] [adminlevel]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player.");
        if (admlvl > 6 || admlvl < 0) return SendClientMessage(playerid, COLOR_WHITE,"Levels only from 1 - 6");
        
        PInfo[id][pAdmin] = admlvl;
        GetPlayerName(id, victimname, sizeof(victimname));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        new str[128];
        format(str,128,"You have gave admin level %i to %s[ID %d]", admlvl, victimname, id);
        SendClientMessage(playerid, COLOR_WHITE, str);

        format(str,128,"Admin %s[ID %d] gave you admin level %i", adminname, playerid, admlvl);
        SendClientMessage(id, COLOR_WHITE, str);

        format(str,128,"Admin %s[ID %d] has set %s [ID %d] admin level to %i",adminname, playerid, victimname, id, admlvl);
        SendClientMessageToAll(COLOR_WHITE,str);
	    return 1
	}
	else return AdminCMD(playerid, 5);
{
Reply
#2

You are opening the bracket at the end, not closing it. change the bottom '{' to a '}'
Reply
#3

Also add a ";" after "return 1" ->> "return 1;"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)