tyler jenkins wrote:I keep getting an issue saying that I'm missing a [ or ; at the same line. It's been a while since I've programmed in Java but I keep looking over what I have and nothing seems to stand out. :3
Well, compile errors come with a filename, line numbers, etc. It would be a good idea to start there -- and probably a good idea to point out the location for us...
Also, compile errors about missing stuff, are generally syntax errors -- and it may be a good idea to look at lines before the location pointed out by the compiler too.
tyler wrote:I keep looking over what I have and nothing seems to stand out...
Please DontWriteLongLines. It makes your thread very hard to read. I've broken yours up this time, but for future reference, please remember:
80 characters max.
And that includes comments (which I notice you were careful about) AND string literals.
Also, you are comparing an int to the value 'y'. This will probably not yield the result you are expecting.
Another issue is comparing to true should be all lowercase ('true' not 'True').
As Ivan Jozsef Balazs pointed out, you could (some may argue that you should/must) use
The point that I am trying to make is that there are Java keywords that you need to be aware of ('switch' is one. 'true' is another). If you are trying to see "if" something is true, you don't need to explicitly use the word true in the comparison. If you do explicitly use the keyword 'true', it must be all lowercase. You are allowed to use a variable named 'True', but it is not conventional and is not the same as 'true'.