SA-MP Forums Archive
Help.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help.. (/showthread.php?tid=430435)



Help.. - Areax - 13.04.2013

Hello!

What is wrong with that?

Code:

PHP код:
    if(gPlayerInfo[playerid][PLAYER_LEVEL] < 5) || if(IsPlayerAdmin(playerid)) //this is a line 863.
        
return SendClientMessage(playeridCOLOR_RED"You are not allowed to use this command!"); 
I get thit errors

Errors:

PHP код:
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(863) : error 029invalid expressionassumed zero
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(863) : warning 215expression has no effect
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(863) : error 001expected token";"but found "if"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Thank you


Re: Help.. - SilverKiller - 13.04.2013

Try :

pawn Код:
if(gPlayerInfo[playerid][PLAYER_LEVEL] < 5) || IsPlayerAdmin(playerid))



Re: Help.. - Areax - 13.04.2013

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
Try :

pawn Код:
if(gPlayerInfo[playerid][PLAYER_LEVEL] < 5) || IsPlayerAdmin(playerid))
Now this

Errors:

PHP код:
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(863) : error 029invalid expressionassumed zero
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(863) : error 001expected token";"but found ")"
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(863) : error 029invalid expressionassumed zero
C
:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(863) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors




Re: Help.. - Areax - 13.04.2013

I fixed this...but now I get new error:

Error:

PHP код:
C:\Users\tadej\Desktop\SA-MP Server\gamemodes\New.pwn(864) : error 001expected token"*then"but found "return"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

On this line

Line:

PHP код:
    return SendClientMessage(playeridCOLOR_RED"You are not allowed to use this command!"); 



Re: Help.. - Areax - 13.04.2013

Anyone?


Re: Help.. - andrewgrob - 13.04.2013

use

pawn Код:
}
return 0; // prevent the message to be sent on global chat
}