Jump to content
  • 0

[GF/RP] Problema AdminDuty


Andr3y

Question

Deci am asa am vrut sa bag comanda adminduty si imi da erorile de mai jos

nush dc la linia 23433  am asa          if(AdminDuty[playerid] == 1)

                              {

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : error 017: undefined symbol "AdminDuty"

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : warning 215: expression has no effect

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : error 001: expected token: ";", but found "]"

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : error 029: invalid expression, assumed zero

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

Snapshot_2012_03_07_003934.jpg
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Ia incearca-l pe asta :

if(strcmp(cmd, "/adminduty", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
 			if(JustAD[playerid] == 1)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "*** Asteapta 6 minute pentru a putea folosi aceasta comanda! {55D4FF}/adminduty");
	            return 1;
	        }
		    if(AdminDuty[playerid] == 1)
		    {
		    	JustAD[playerid] = 1;
		    	SetTimerEx("ReportAD", 300000, false, "i", playerid);
		    	GetPlayerName(playerid,sendername,sizeof(sendername));
			    format(string, sizeof(string), "[Admin Info] %s [ID:%d] is no longer on duty as an admin.", sendername,playerid);
				SendClientMessageToAll(COLOR_ADMINDUTY,string);
				SetPlayerToTeamColor(playerid);
				AdminDuty[playerid] = 0;
				SetPlayerHealth(playerid,100);
				SetPlayerArmour(playerid,0);

			}
		    else
		    {
		    	GetPlayerName(playerid,sendername,sizeof(sendername));
		    	format(string, sizeof(string), "[Admin Info] %s [ID:%d] is now on duty as an admin.Please /w him if you need help.", sendername,playerid);
				SendClientMessageToAll(COLOR_ADMINDUTY,string);
				AdminDuty[playerid] = 1;
				SetPlayerColor(playerid,COLOR_ADMINDUTY);
				SetPlayerHealth(playerid,99999);
				SetPlayerArmour(playerid,99999);
		    }
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "{55D4FF}EROARE:{FF0000} You are not authorized to use that command");
		}
		return 1;
	}

Link to comment
Share on other sites

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23279) : error 017: undefined symbol "JustAD"

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23279) : warning 215: expression has no effect

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23279) : error 001: expected token: ";", but found "]"

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23279) : error 029: invalid expression, assumed zero

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23279) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

Snapshot_2012_03_07_003934.jpg
Link to comment
Share on other sites

Deci am asa am vrut sa bag comanda adminduty si imi da erorile de mai jos

nush dc la linia 23433  am asa          if(AdminDuty[playerid] == 1)

                              {

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : error 017: undefined symbol "AdminDuty"

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : warning 215: expression has no effect

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : error 001: expected token: ";", but found "]"

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : error 029: invalid expression, assumed zero

C:\Users\Home\Desktop\RPG RomaniaLife\gamemodes\RomaniaLife.pwn(23433) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

tine tot comanda ta si defineste global

new AdminDuty[MAX_PLAYERS];

iar la OnPLayerConnect adaugi

AdminDuty[playerid] = 0;

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.