Page 1 of 1

I request assistance with a line of code

Posted: Sat Jul 03, 2021 1:46 am
by ronald828
I added an input as a bool variable:
extern bool Gobar0 = false;

I added a condition for entry using the variable:
&& Gobar0 = true

I get 2 errors for the above line:
"&&" - I value required
"=" - I value required

Re: I request assistance with a line of code

Posted: Sat Jul 03, 2021 2:19 am
by Deez
ronald828 wrote: Sat Jul 03, 2021 1:46 am I added an input as a bool variable:
extern bool Gobar0 = false;

I added a condition for entry using the variable:
&& Gobar0 = true

I get 2 errors for the above line:
"&&" - I value required
"=" - I value required
&& - it looking for 2 conditions being met

(condition1) && (Gobar0 = true)

Re: I request assistance with a line of code

Posted: Sat Jul 03, 2021 2:40 am
by ronald828
Deez wrote: Sat Jul 03, 2021 2:19 am && - it looking for 2 conditions being met

(condition1) && (Gobar0 = true)
The error says ". . I-value required" , the letter i

Re: I request assistance with a line of code

Posted: Sat Jul 03, 2021 2:54 am
by ChuChu Rocket
ronald828 wrote: Sat Jul 03, 2021 2:40 am The error says ". . I-value required" , the letter i
As Deez said && is looking for two conditions.

Re: I request assistance with a line of code

Posted: Sat Jul 03, 2021 3:12 am
by ronald828
ChuChu Rocket wrote: Sat Jul 03, 2021 2:54 am As Deez said && is looking for two conditions.
It's one of six lines with six conditions. So I did a little trial and error looking at the other lines for clues.
So I tried "&& iCustom Gobar0 = true" and came up with a different error.
Then I tried "&& MathAbs (Gobar0 = true)" and I placed parentheses
around the condition as I saw them elsewhere. Now there are no errors

Re: I request assistance with a line of code

Posted: Sat Jul 03, 2021 4:20 am
by mladen
ronald828 wrote: Sat Jul 03, 2021 3:12 am It's one of six lines with six conditions. So I did a little trial and error looking at the other lines for clues.
So I tried "&& iCustom Gobar0 = true" and came up with a different error.
Then I tried "&& MathAbs (Gobar0 = true)" and I placed parentheses
around the condition as I saw them elsewhere. Now there are no errors
Gobar0 = true is assignment not a comparison, you are missing one "="

Re: I request assistance with a line of code

Posted: Sat Jul 03, 2021 11:48 pm
by ChuChu Rocket
mladen wrote: Sat Jul 03, 2021 4:20 am Gobar0 = true is assignment not a comparison, you are missing one "="
Thanks for chiming in Mladen. Very helpful 👌