0

change the value of a boolean

when I create a boolean (boolean enable;) And I try to change the value ( boolean enable = true;) than if I test it it still outputs false and in the code at the spot where I change to boolean it says that boolean in not used in the code

7th Aug 2016, 10:28 AM
SeaLanternYT
SeaLanternYT - avatar
2 odpowiedzi
+ 2
Is boolean 'enable' a field or a local variable?? You are declaring the same variable twice too. Delete 'boolean' in 'boolean enable = true;'.
7th Aug 2016, 11:36 AM
Lordeblader
+ 1
a local variable, thanks it works now I removed boolean!
7th Aug 2016, 11:42 AM
SeaLanternYT
SeaLanternYT - avatar