/admins
#1

The /admins that I had only told you the Level of the admin and that was it.. I looked on other scripts and found this one where you can change the Name of the rank. I added it into the script but then I had an error. Anyone think they can help me?

Код:
C:\Documents and Settings\Family\My Documents\SAMP server\Serious-Elite RP\gamemodes\Euro-Elite.pwn(9459) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
This is the command Im using:

Код:
	if (strcmp(cmd, "/admins", true) == 0)
	{
    if(IsPlayerConnected(playerid))
	  {
	    SendClientMessage(playerid, COLOR_GREEN, "|____ WW:RP Administration Team ____|");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				  if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1337)
				  {
				    new admtext[64];
				    if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Community Owner"; }
				    else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Lead Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Game Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 2)	{ admtext = "RP Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Administrator"; }
						else { admtext = "Unknown Admin Rank"; }
						new sendername[MAX_PLAYER_NAME]
						GetPlayerName(i, sendername, sizeof(sendername));
						if(AdminDuty[i] == 0)
						{
							format(string, 256, "%s: %s", admtext, GetPlayerNameEx(i));
							SendClientMessage(playerid, COLOR_WHITE, string);
						}
						else
						{
						  format(string, 256, "%s: %s (on duty)", admtext, GetPlayerNameEx(i));
							SendClientMessage(playerid, COLOR_ADMINDUTY, string);
						}
					}
				}
			}
		}
		return 1;
	}
Many thanks,
Sam.
Reply
#2

Which is line 9459?
Reply
#3

Код:
GetPlayerName(i, sendername, sizeof(sendername));
Reply
#4

The previous line was

pawn Код:
new sendername[MAX_PLAYER_NAME]
The correct line is
pawn Код:
new sendername[MAX_PLAYER_NAME];
Quote:
Originally Posted by Weirdosport
Which is line 9459?
Remember that it is always the problem with the line before with a error 001.
Reply
#5

It works, Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)