View Single Post
  #1   Spotlight this post!  
Unread 19-01-2003, 10:47
Morgoth Morgoth is offline
Registered User
#0471 (Cybertigers)
 
Join Date: Oct 2002
Location: Michigan
Posts: 35
Morgoth is an unknown quantity at this point
Whats wrong with this code?

This is my first year doing the programming and I am having trouble with if statements. I know C++, Javascript, regular BASIC but i can't figure out whats wrong with this.

if (p1_y > 135) then skip:
skip:
relay1_fwd = 1

I used "skip:" because if I just put relay1_fwd = 1 under then, it tells me that it expects a label or something directlyafter then. I have tried it with 135 < p1_y and that doesn't work either. I have verified that something is hooked up to relay1, so that isn't the problem. It compiles fine but when I put the y axis on port 1 to greater than 135 nothing happens. I know the joystick works because I have checked it using dashboard.

Also, does white space matter in PBASIC?

Thanks a lot