Reading From Y_INI Files
#2

Update: I think I'm getting somewhere, I've got the errors down a little but not sure if I'm going the right way?


Код:
cmd(admins playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_ADMIN, "Online Staff Members:");

        new count; new ID; new admtext[64];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                new sendername[MAX_PLAYER_NAME];
                switch(PlayerInfo[i][pAdminLevel])
                        case 1: format(admtext, 64, "{10F441}Beta Tester");
                        case 2: format(admtext, 64, "{10F441}Moderator");
                        case 3: format(admtext, 64, "{33AA33}Administrator");
                        case 4: format(admtext, 64, "{FF0000}Senior Administrator");
                        case 1337: format(admtext, 64, "{FF0000}Head Administrator");
                        default: continue;
                    }

                GetPlayerName(i, sendername, sizeof(sendername));
                new tstr[128];
                format(tstr, 128, "%s(%d) - %s", sendername, ID, admtext);
                SendClientMessage(playerid, -1, tstr);
                format(admtext, 64, "");
                count++;
            }
            if(count == 0)
			{
			    SendClientMessage(playerid, COLOR_ERROR, "No online administrators found.");
				return 1;
			}
        }
    }
    return 1;
}
That's what I've changed now and it's returning this error:
Код:
C:\Users\Tom\Desktop\SAMP Server\gamemodes\newgm.pwn(373) : error 001: expected token: "{", but found "case"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Messages In This Thread
Reading From Y_INI Files - by Skillzz - 29.06.2016, 23:46
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 00:13
Re: Reading From Y_INI Files - by SkillNasr - 30.06.2016, 00:33
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 00:38
Re: Reading From Y_INI Files - by DTV - 30.06.2016, 01:25
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 12:20
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 21:06
Re: Reading From Y_INI Files - by Stinged - 30.06.2016, 21:14
Re: Reading From Y_INI Files - by Skillzz - 30.06.2016, 22:09

Forum Jump:


Users browsing this thread: 1 Guest(s)