View Full Version : First program Problem
Freddie
03-24-2007, 05:17 PM
I've started programming and I cannot understand why my "If, else if" portion is not working. I've attached a screen capture showing my program and the errors on the bottom. Can anyone give me some guidance? It's telling me that it does not recognize else in "else if" even though it colors it blue on the screen.
thx in advance,
Fred
Freddie
03-24-2007, 05:19 PM
Sorry here's a better screen capture without the message caught in the middle.
Forex Ninja
03-24-2007, 06:24 PM
Hi Freddie,
When you're using a branching command like if/else, you have to make sure to place braces in the right places. Also, you should use == instead of = when writing the conditions for the 'if' portion of the command. And keep in mind that two ampersands && are used for the logical 'AND.' Hopefully the attached document will help to clear things up.
NinjaTrader_Ray
03-25-2007, 04:03 AM
Thanks for helping out Forex Ninja.
Forex Ninja
03-25-2007, 06:05 AM
No prob.
Freddie
03-25-2007, 09:51 AM
Thx Forex Ninja. I'll give it a try. Not that familiar with the programming language so it will take a bit of time to get famaliar with it.