/setadmin problem. need help please
#1

Here all the enum has been added and done

pawn Код:
enum pInfo
{
    Password,
    Cash,
    Kills,
    Deaths,
    Adminlevel,
    levels
}
pawn Код:
D:\gta.sa\BaseNorton V2\gamemodes\Test.pwn(1545) : warning 219: local variable "levels" shadows a variable at a preceding level
D:\gta.sa\BaseNorton V2\gamemodes\Test.pwn(1549) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
D:\gta.sa\BaseNorton V2\gamemodes\Test.pwn(1549) : warning 215: expression has no effect
D:\gta.sa\BaseNorton V2\gamemodes\Test.pwn(1549) : error 001: expected token: ";", but found "]"
D:\gta.sa\BaseNorton V2\gamemodes\Test.pwn(1549) : error 029: invalid expression, assumed zero
D:\gta.sa\BaseNorton V2\gamemodes\Test.pwn(1549) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
the scripts
pawn Код:
CMD:setadmin(playerid, params[])
{
    ((LINE 1545))  new id, levels, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
    if(PlayerInfo[playerid][Adminlevel] < 4) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command ");
    if(sscanf(params,"ui", id, levels)) return SendClientMessage(playerid, COLOR_SYNTAX,"[SYNTAX]: /givemoney [playerid/partofname] [ammount]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]: Invalid player ID");
    ((THIS IS THE LINE 1549))  if(pInfo[id][AdminLevel] == levels) return SendClientMessage(playerid,0xFF0000FF, "ERROR: That person is already this admin level!");//Detect if the guy is already the level you setted
    GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//define the playerid name
    GetPlayerName(id,pname,MAX_PLAYER_NAME);//define the other person name
    if(levels == 0)
    {
        format(str, sizeof(str),"%s has your Admin level to %d on the server. *cry *cry",Nam,levels);
        SendClientMessage(ID,0xFF9900AA,str);
        format(str, sizeof(str),"You had set %s Admin level to %d!",pname,levels);
        SendClientMessage(playerid,0xFF9900AA,str);
        PlayerData[ID][AdminLevel] = levels;//this sets the player level
        return 1;
    }
    format(str, sizeof(str),"%s has your Admin level to %d on the server.",Nam,levels);
    SendClientMessage(ID,0xFF9900AA,str);
    format(str, sizeof(str),"You had set %s Admin level to %d!",pname,levels);
    SendClientMessage(playerid,0xFF9900AA,str);
    PlayerData[ID][AdminLevel] = levels;
    return 1;
}
Reply


Messages In This Thread
/setadmin problem. need help please - by jaami - 24.04.2012, 15:27
Re: /setadmin problem. need help please - by Twisted_Insane - 24.04.2012, 15:31
Re: /setadmin problem. need help please - by jaami - 24.04.2012, 15:36
Re: /setadmin problem. need help please - by Elysian` - 24.04.2012, 15:38
Re: /setadmin problem. need help please - by jaami - 24.04.2012, 15:41
Re: /setadmin problem. need help please - by Elysian` - 24.04.2012, 15:42
Re: /setadmin problem. need help please - by Scripter12345 - 24.04.2012, 15:54
Re: /setadmin problem. need help please - by jaami - 24.04.2012, 16:48
Re: /setadmin problem. need help please - by Elysian` - 24.04.2012, 16:49
Re: /setadmin problem. need help please - by jaami - 24.04.2012, 16:51
Re: /setadmin problem. need help please - by Elysian` - 24.04.2012, 16:54
Re: /setadmin problem. need help please - by jaami - 24.04.2012, 17:02
Re: /setadmin problem. need help please - by Elysian` - 24.04.2012, 17:04
Re: /setadmin problem. need help please - by jaami - 24.04.2012, 17:05
Re: /setadmin problem. need help please - by Leo Karls - 24.04.2012, 17:15

Forum Jump:


Users browsing this thread: 1 Guest(s)