Invalid Expression problem cant fix
#1

PHP код:
                            if(AdminDuty[i] == 0)
                        }
                        else (( 
This line i got error invalid expression))
                        {
                        (
strcmp(PlayerInfo[i][pAdmName], "None"true) == 0);
                        }
                        {
                            
format(string256"%s: %s"admtextsendername);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else (( 
This line i got error invalid expression))
                        {
                            
format(string256"%s: %s (on duty)"admtextsendername);
                            
SendClientMessage(playeridTEAM_VAGOS_COLORstring);
                        } 
Please tell me whats the mistaken. Thank you
Reply
#2

If adminduty == 0...
What happens if that happens?
You immidiatly go to else
Reply
#3

deleted
Reply
#4

pawn Код:
if(AdminDuty[i] == 0) return 0; //I assumed you wanted it to return 0 (even though it's completely pointless in the first place)
else //else what?
{
    (strcmp(PlayerInfo[i][pAdmName], "None", true) == 0);
    format(string, 256, "%s: %s", admtext, sendername);
    SendClientMessage(playerid, COLOR_WHITE, string);
}
else //yet again, else what?
{
    format(string, 256, "%s: %s (on duty)", admtext, sendername);
    SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
Untested, just some simple fixes/indents done. You didn't give us enough information to properly fix your code for you, therefore you are bound to have errors.
Reply
#5

pawn Код:
if(AdminDuty[i] == 0) return 0;
    if else (AdminDuty[i] == 1) // == 1 or whatever
  {
        (strcmp(PlayerInfo[i][pAdmName], "None", true) == 0);
        format(string, 256, "%s: %s", admtext, sendername);
        SendClientMessage(playerid, COLOR_WHITE, string);
    }else{
        format(string, 256, "%s: %s (on duty)", admtext, sendername);
        SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)