Setting admins
#9

Quote:
Originally Posted by MillenniumG
Посмотреть сообщение
Try using a switch statement:

pawn Код:
stock GetAdminRank(playerid)
{
    new Rank[60],
        adminlevel = PlayerStat[playerid][AdminLevel;
    switch(adminlevel)
    {
        case 0: format(Rank, sizeof(rank), "None");
        case 1: format(Rank, sizeof(rank), "Guider");
        case 2: format(Rank, sizeof(rank), "Senior Guider");
        case 3: format(Rank, sizeof(rank), "Chief Guidere");
        case 4: format(Rank, sizeof(rank), "Server Monitor");
        case 5: format(Rank, sizeof(rank), "Junior Staff Member");
        case 6: format(Rank, sizeof(rank), "General Staff Member");
        case 7: format(Rank, sizeof(rank), "Senior Staff Member");
        case 8: format(Rank, sizeof(rank), "Staff Executive");
        case 9: format(Rank, sizeof(rank), "Staff Director");
        case 10: format(Rank, sizeof(rank), "Server Director");
        case 101: format(Rank, sizeof(rank), "Server Director [HoS]");
    }
    return Rank;
}
Gave that a try mate, but it's returning me these errors. I'm not sure how to fix it

pawn Код:
C:\Users\cbrickell\Desktop\PWN\gamemodes\EGRP.pwn(3372) : error 017: undefined symbol "rank"
C:\Users\cbrickell\Desktop\PWN\gamemodes\EGRP.pwn(3372) : error 036: empty statement
C:\Users\cbrickell\Desktop\PWN\gamemodes\EGRP.pwn(3373) : error 014: invalid statement; not in switch
C:\Users\cbrickell\Desktop\PWN\gamemodes\EGRP.pwn(3373) : warning 215: expression has no effect
C:\Users\cbrickell\Desktop\PWN\gamemodes\EGRP.pwn(3373) : error 001: expected token: ";", but found ":"
C:\Users\cbrickell\Desktop\PWN\gamemodes\EGRP.pwn(3373) : error 029: invalid expression, assumed zero
C:\Users\cbrickell\Desktop\PWN\gamemodes\EGRP.pwn(3373) : fatal error 107: too many error messages on one line

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


6 Errors.
Reply


Messages In This Thread
Setting admins - by Josh_Main - 01.10.2014, 10:10
Re: Setting admins - by amirab - 01.10.2014, 10:20
Re: Setting admins - by Josh_Main - 01.10.2014, 10:26
Re: Setting admins - by ReD_HunTeR - 01.10.2014, 10:29
Re: Setting admins - by Josh_Main - 01.10.2014, 10:35
Re: Setting admins - by thefatshizms - 01.10.2014, 10:37
Re: Setting admins - by Josh_Main - 01.10.2014, 10:38
Re: Setting admins - by MillenniumG - 01.10.2014, 11:12
Re: Setting admins - by Josh_Main - 01.10.2014, 11:44
Re: Setting admins - by MillenniumG - 01.10.2014, 12:59

Forum Jump:


Users browsing this thread: 1 Guest(s)