View Single Post
Old 12-05-2004, 04:43 PM   #9 (permalink)
Rawb
Crazy
 
Location: Salt Town, UT
I think either your code got mangled, or I couldn't read it anyways.

But here is my helpful tip for you, that will probably get you finished with this project:
ALWAYS use {}'s after an if. ALWAYS. Literally, never, ever, ever skip out on the {}'s, pretend that it is a bug in the compiler that it will compile things without {}'s

Here is another tip that I like, but never actually practice, is to put the static part of the equals before the variable part. Like (2 == foo) or ('j' == bar) if you did something like you did above (and what crashed a space probe), your compiler will warn you and fail.

If you just want to know what you went wrong, here's the spoiler for you:
Code:
Spoiler over here -----------------------------------------------------------------------------------------------> You used single equal signs in the if statements, overwriting the variable. Switch to double equals and you should be good.
Rawb is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62