trying to make a command work for admin
#1

pawn Код:
if (PlayerInfo[playerid][pTesters] < 1) && else if(PlayerInfo[playerid][pAdmin] < 2)) {
I am trying to make a command work for admins and testers, the code above is what am trying to do, but, i get these error

C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : error 029: invalid expression, assumed zero
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : warning 215: expression has no effect
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : error 001: expected token: ";", but found "else"
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : error 029: invalid expression, assumed zero
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : fatal error 107: too many error messages on one line
Reply
#2

You can't use && between ifs.
Reply
#3

pawn Код:
if((PlayerInfo[playerid][pTesters] < 1) || (PlayerInfo[playerid][pTesters] < 1 && PlayerInfo[playerid][pAdmin] < 2)) {
    // Code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)