C:\Documents and Settings\user\Desktop\Gamemode\Vane\gamemodes\vrp. pwn(31808) : error 029: invalid expression, assumed zero |
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
new string[64];
new string2[128];
new ranktext[32];
(Line: 31808) - if(PlayerInfo[clickedplayerid][pHelper] == 1 && == 0){ ranktext = "Helper"; }
if(PlayerInfo[clickedplayerid][pAdmin] == 2 && == 0){ ranktext = "Administrator"; }
if(PlayerInfo[clickedplayerid][pAdmin] == 2 && == 0){ ranktext = "Administrator"; }
if(PlayerInfo[clickedplayerid][pAdmin] == 3 && == 0){ ranktext = "Lead Administrators"; }
if(PlayerInfo[clickedplayerid][pAdmin] == 6 && == 0){ ranktext = "Head Administrators"; }
else { ranktext = "Civilian"; }
if(clickedplayerid == playerid)
{
format(string, sizeof(string), "Player Info: %s", RPN);
format(string2, sizeof(string2), "Name: %s\nRank: %s\nLevel: %d\n Paycheck Time(60): %d", RPN(clickedplayerid),ranktext,PlayerInfo[clickedplayerid][pLevel], PlayerInfo[clickedplayerid][pMinutes]);
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, string, string2, "Ok","");
} else {
format(string, sizeof(string), "Player Info: %s", RPN);
format(string2, sizeof(string2), "Name: %s\nRank: %s\nLevel: %d", RPN(clickedplayerid),ranktext,PlayerInfo[clickedplayerid][pLevel]);
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, string, string2, "Ok","");
}
return 1;
}
if(PlayerInfo[clickedplayerid][pHelper] == 1 && == 0){ ranktext = strval("Helper"); }
Use strval.
pawn Код:
|
C:\Documents and Settings\user\Desktop\Gamemode\Vane\gamemodes\vrp.pwn(31808) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\Gamemode\Vane\gamemodes\vrp.pwn(31808) : warning 215: expression has no effect
C:\Documents and Settings\user\Desktop\Gamemode\Vane\gamemodes\vrp.pwn(31808) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\user\Desktop\Gamemode\Vane\gamemodes\vrp.pwn(31808) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\Gamemode\Vane\gamemodes\vrp.pwn(31808) : fatal error 107: too many error messages on one line
if(PlayerInfo[clickedplayerid][pHelper] == 1 && == 0){ ranktext = strval("Helper"); }
if(PlayerInfo[clickedplayerid][pHelper] == 1)
{
ranktext = "Helper";
}
Also , why you used && == 0 that's mean if his admin rank equal to 0 , you need to change to '&& PlayerInfo[clickedplayer][Admin]!=0' which means not equal too. also its useless checking your variable will be check once the player is level 1 only.
|
if(PlayerInfo[clickedplayerid][pHelper] == 1){ ranktext = "Helper"; }
else if(PlayerInfo[clickedplayerid][pAdmin] == 2){ ranktext = "Administrator"; }
else if(PlayerInfo[clickedplayerid][pAdmin] == 2){ ranktext = "Administrator"; }
else if(PlayerInfo[clickedplayerid][pAdmin] == 3){ ranktext = "Lead Administrators"; }
else if(PlayerInfo[clickedplayerid][pAdmin] == 6){ ranktext = "Head Administrators"; }