Help with error 029: invalid expression,
#1

I get this ...
C:\Users\Tomi\Desktop\Real Gaming v4.0 by Nelson\gamemodes\RG-RP.pwn(7762 : error 029: invalid expression, assumed zero
C:\Users\Tomi\Desktop\Real Gaming v4.0 by Nelson\gamemodes\RG-RP.pwn(7762 : error 029: invalid expression, assumed zero

For this line if(PlayerInfo[ playerid ][ xHelper ] >= 1 ) || (PlayerInfo[ playerid ][ xAdmin ] >= 1 ) || ( PlayerInfo[ playerid ][ xVIPLevel ] >= 1 ) || ( PlayerInfo[ playerid ][ xPromoter ] == 1 ) {
idk where is problem.
Reply
#2

The problem is the parenthesis.
Код:
if(PlayerInfo[ playerid ][ xHelper ] >= 1 ) || (PlayerInfo[ playerid ][ xAdmin ] >= 1 ) || ( PlayerInfo[ playerid ][ xVIPLevel ] >= 1 ) || ( PlayerInfo[ playerid ][ xPromoter ] == 1 )
To fix it you will need to open one or remove the closed parentheses.
Код:
if((PlayerInfo[ playerid ][ xHelper ] >= 1 ) || (PlayerInfo[ playerid ][ xAdmin ] >= 1 ) || ( PlayerInfo[ playerid ][ xVIPLevel ] >= 1 ) || ( PlayerInfo[ playerid ][ xPromoter ] == 1 )
The same happens with the last expression
Код:
if(... || ( PlayerInfo[ playerid ][ xPromoter ] == 1 )
To fix it you will need to do the same as before.
Код:
if(... || ( PlayerInfo[ playerid ][ xPromoter ] == 1 ))
Or just use parenthesis when they are really required.
pawn Код:
if (PlayerInfo[ playerid ][ xHelper ] >= 1
|| PlayerInfo[ playerid ][ xAdmin ] >= 1  
|| PlayerInfo[ playerid ][ xVIPLevel ] >= 1
|| PlayerInfo[ playerid ][ xPromoter ] == 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)