Invalid function
#1

Код:
		if(strcmp(cmd, "/staff", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if(PlayerInfo[playerid][pAdmin] >= 0)
	    	{
				SendClientMessage(playerid, COLOR_YELLOW, "Admins Online:");
				for(new i = 0; i<MAX_PLAYERS; i++)
				{
				    if(IsPlayerConnected(i))
				    {
						if(PlayerInfo[i][pAdmin] > 0)
						{
        					if(PlayerInfo[i][pAdmin] <= PlayerInfo[playerid][pAdmin])
        					{
        					    new atext[64];
 								if(PlayerInfo[i][pAdmin] == 2)
								{
									atext = "Junior Admin";
								}
								else if(PlayerInfo[i][pAdmin] == 3)
								{
									atext = "General Admin";
								}
								else if(PlayerInfo[i][pAdmin] == 4)
								{
									atext = "Senior Admin";
								}
								else if(PlayerInfo[i][pAdmin] == 1337)
								{
									atext = "Head Admin";
								}
								else if(PlayerInfo[i][pAdmin] == 1338)
								{
									atext = "Head Admin";
								}
								else if(PlayerInfo[i][pAdmin] == 99999)
								{
									atext = "Executive Admin";
								}
								format(string, sizeof(string), "%s: %s", atext, PlayerName(i));
				            	SendClientMessage(playerid, COLOR_WHITE, string);
								SendClientMessage(playerid, COLOR_GREEN, "Moderators Online:");
                				for(new i = 0; i<MAX_PLAYERS; i++)
       						    {
        							new atext[64];
									if(PlayerInfo[i][pAdmin] == 1)
									{
									atext = "Moderator";
									}
					    				format(string, sizeof(string), "%s: %s", atext, PlayerName(i));
       									SendClientMessage(playerid, COLOR_WHITE, string);
										SendClientMessage(playerid, COLOR_BLUE, "Helpers Online:");
      									for(new i = 0; i<MAX_PLAYERS; i++)
     						    		{
											if(PlayerInfo[i][pHelper] == 1)
											{
												atext = "Helper";
											}
											format(string, sizeof(string), "%s: %s", atext, PlayerName(i));
				            				SendClientMessage(playerid, COLOR_WHITE, string);
											}
										}
									}
								}
							}													}
						}
					}
				}
	    	}
		}
	    return 1;
	}
What's wrong?

'Invalid function or declaration' on every line
Reply
#2

It would really help us if you could tell us what line you're getting the error on.
Reply
#3

On every

Код:
if(PlayerInfo[i][pAdmin] == 2)
								{
									atext = "Junior Admin";
								}
line, also on the helper one.
Reply
#4

Are you sure this is placed under "OnPlayerCommandText" callback?
Reply
#5

Yes it is
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)