New Errors!
#1

Please help me with these errors
Код:
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : error 029: invalid expression, assumed zero
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : warning 215: expression has no effect
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : error 001: expected token: ";", but found "]"
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : error 029: invalid expression, assumed zero
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : fatal error 107: too many error messages on one line
Reply
#2

PlayerInfo[playerid][pAdminTitle]

Is pAdminTitle there in your enum??
And after declaring a enum did you new PlayerInfo[MAX_PLAYERS][ENUM]; ??
Reply
#3

I meant by this code, not the other code. Take a closer look at it
Код:
CMD:aduty(playerid)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
	{
	    new string[128];
		if(AdminDuty[playerid] == 0)
		{
				format(string, sizeof(string), "<%s> %s %s is now on duty.",PlayerInfo[playerid][pAdmin], [pAdminTitle], PlayerName(playerid));
				BroadCast(COLOR_YELLOW,string);
				AdminDuty[playerid] = 1;
				SetPlayerColor(playerid, COLOR_BRIGHTRED);
				if(PlayerInfo[playerid][pSex] == 1)
				{
				    SetPlayerSkin(playerid, 217);
				}
				else
				{
				    SetPlayerSkin(playerid, 211);
				}
				return 1;
		}
		else
		{
				format(string, sizeof(string), "<%s> %s %s is now off duty.",PlayerInfo[playerid][pAdmin], [pAdminTitle], PlayerName(playerid));
				BroadCast(COLOR_YELLOW,string);
				AdminDuty[playerid] = 0;
				DestroyDynamic3DTextLabel(AdminLabel[playerid]);
				SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
				if(PlayerInfo[playerid][pDonateRank] == 1 || PlayerInfo[playerid][pDonateRank] == 2 || PlayerInfo[playerid][pDonateRank] == 3)
				{
					SetPlayerColor(playerid, COLOR_YELLOW);
				}
				else if(PlayerInfo[playerid][pDonateRank] >= 4)
				{
					SetPlayerColor(playerid, COLOR_PINK);
				}
				else if(PlayerInfo[playerid][pConnectTime] < 50)
				{
					SetPlayerColor(playerid, COLOR_LIGHTGREEN);
				}
				else
				{
					SetPlayerColor(playerid, COLOR_WHITE);
				}
				return 1;
		}
	}
	return 1;
}
Error is in the red light
please help me fix it and thanks
Reply
#4

Try to change the red line in this
PHP код:
new playername[MAX_PLAYERS_NAME];
format(stringsizeof(string), "<%s> %s %s is now on duty.",PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pAdminTitle], playername(playerid)); 
Reply
#5

Still no good same errors
Reply
#6

Can somebody help me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)