Little question.
#1

I will explain quickly.
I'm trying to make a command, and I want that his command run only if variables Engine1 OR Engine2 are on value 1.

I put this:
if(Engine1 == 1 && Engine2 == 1) This didnt work...
Then tryed this:
if(Engine1 == 1 || Engine2 == 1) Same result

What may I put?

Thanks for any help.
Reply
#2

Quote:
Originally Posted by JonyAvati
I will explain quickly.
I'm trying to make a command, and I want that his command run only if variables Engine1 OR Engine2 are on value 1.

I put this:
if(Engine1 == 1 && Engine2 == 1) This didnt work...
Then tryed this:
if(Engine1 == 1 || Engine2 == 1) Same result

What may I put?

Thanks for any help.
if(Engine1 == 1 || Engine2 == 1) is correct for what you want the problem must be somewhere else in script.
Reply
#3

Quote:
Originally Posted by Battleskull
Quote:
Originally Posted by JonyAvati
I will explain quickly.
I'm trying to make a command, and I want that his command run only if variables Engine1 OR Engine2 are on value 1.

I put this:
if(Engine1 == 1 && Engine2 == 1) This didnt work...
Then tryed this:
if(Engine1 == 1 || Engine2 == 1) Same result

What may I put?

Thanks for any help.
if(Engine1 == 1 || Engine2 == 1) is correct for what you want the problem must be somewhere else in script.
Thank you, so "||" = OR or AND ?

I will try to found the problem, thank you
Reply
#4

Quote:
Originally Posted by JonyAvati
Quote:
Originally Posted by Battleskull
Quote:
Originally Posted by JonyAvati
I will explain quickly.
I'm trying to make a command, and I want that his command run only if variables Engine1 OR Engine2 are on value 1.

I put this:
if(Engine1 == 1 && Engine2 == 1) This didnt work...
Then tryed this:
if(Engine1 == 1 || Engine2 == 1) Same result

What may I put?

Thanks for any help.
if(Engine1 == 1 || Engine2 == 1) is correct for what you want the problem must be somewhere else in script.
Thank you, so "||" = OR or AND ?

I will try to found the problem, thank you
|| is or and && is and
Reply
#5

Quote:
Originally Posted by Battleskull
Quote:
Originally Posted by JonyAvati
Quote:
Originally Posted by Battleskull
Quote:
Originally Posted by JonyAvati
I will explain quickly.
I'm trying to make a command, and I want that his command run only if variables Engine1 OR Engine2 are on value 1.

I put this:
if(Engine1 == 1 && Engine2 == 1) This didnt work...
Then tryed this:
if(Engine1 == 1 || Engine2 == 1) Same result

What may I put?

Thanks for any help.
if(Engine1 == 1 || Engine2 == 1) is correct for what you want the problem must be somewhere else in script.
Thank you, so "||" = OR or AND ?

I will try to found the problem, thank you
|| is or and && is and
Thank you men

EDIT : It works for "engine1" but not for "engine2", so, I can use the command when "engine1" is = 1, but not when engine2 is = 1 or 0... I dont understand.. The same result for || and &&


EDIT AGAIN : Sorry, my mistake. I forgot to add something, it's fully working now. Thank your for the || and && stuff, I didn't knew that before ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)