Variables in coding

Started by AtlantiaKing11NL on Fri, 07/03/2015 - 15:08
Last seen on 17:27, 27. Mar 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Variables in coding
Fri, 07/03/2015 - 15:08

How can you use an if statement or change an Logic variable in a custom code?

My code for now

if(bbq = true) {
    bbq = false
}

if(bbq = false) {
    bbq = true
}

This totally don't work. Please help?

Last seen on 05:04, 14. Jul 2015
Joined Jul 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I'm really wandering how to
Sat, 07/04/2015 - 03:59

I'm really wandering how to use this codes I don't know almost nothing. But my java knolege say that you have made two mistakes:

You should use == for logic tests instead or = (used for attribution).

You should finish comands with ";"

So try this:

if(bbq == true) {
    bbq = false;
}

if(bbq == false) {
    bbq = true;
}

 

Last seen on 17:27, 27. Mar 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Thanks! It works
Sat, 07/04/2015 - 09:27

Thanks! It works