Invalid expression assumed zero
#1

Hello, i want to make that you can use it if you are either VIP or Admin Level. So that you can already use if you are VIP or Admin. But it shows a error, how to fix it?

Код:
	if(pInfo[playerid][pVipLevel] >= 1 & if(pInfo[playerid][pAdminLevel] >= 1)
Reply
#2

Just write:

Код:
if(pInfo[playerid][pVipLevel] >= 1 || pInfo[playerid][pAdminLevel] >= 1)
Greekz
Reply
#3

Re-read, character by character. Then notice your typo: using the bitwise and instead of the logical and operator.
Reply
#4

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Just write:

Код:
if(pInfo[playerid][pVipLevel] >= 1 || pInfo[playerid][pAdminLevel] >= 1)
Greekz
Then you can use it if you are either VIP or Admin? You dont have to be both of them, right?
Reply
#5

Yeah.

|| means if you're a VIP or an admin, you can use the function.
&& means you need to be a VIP and an admin to use the function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)