What is wrong here in this code
#5

If you can't see what is wrong, then I seriously doubt me debugging your script is going to help you
pawn Код:
if (strcmp(cmdtext, "/events", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_GREEN, "Events admins Online:");
            new
                count,
                string[64]
            ;
            for(new i; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pEventadmin] >= 1
                    {
                        GetPlayerName(i, string, sizeof(string));
                        format( string , sizeof(string) , "(%d) %s" , i , string );
                        SendClientMessage(playerid, COLOR_GREEN, string);
                        count++;
                    }
                }
            }
            if( !count )
            {
                SendClientMessage(playerid, COLOR_YELLOW, "*** Server Info *** : No events admins ONLINE");
            } else {
                SendClientMessage(playerid, COLOR_GREEN, "______________");
            }
        }
        return 1;
}
basically, the logic, indentation, and number of braces in this piece of code is completely wrong.


good luck
Reply


Messages In This Thread
What is wrong here in this code - by boyan96 - 26.09.2011, 12:55
Re: What is wrong here in this code - by Xyrex - 26.09.2011, 12:56
Re: What is wrong here in this code - by boyan96 - 26.09.2011, 13:00
Re: What is wrong here in this code - by Xyrex - 26.09.2011, 13:01
Re: What is wrong here in this code - by Rachael - 26.09.2011, 13:05
Re: What is wrong here in this code - by Jafet_Macario - 26.09.2011, 13:07
Re: What is wrong here in this code - by boyan96 - 26.09.2011, 13:10
Re: What is wrong here in this code - by Jafet_Macario - 26.09.2011, 13:12
Re: What is wrong here in this code - by boyan96 - 26.09.2011, 13:16

Forum Jump:


Users browsing this thread: 5 Guest(s)