View Single Post
  #6   Spotlight this post!  
Unread 11-02-2003, 09:51
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,588
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Besides the errors in your syntax (which have already been pointed out), there is an error in your logic.

Lets assume that p1_y is 136 and p3_y is 118. If you follow your code through, you will set p1_y to 127 and then goto end_zero. p3_y will never be set. You need to rearrange your statements.

This is assuming that you are using the pbasic 2.0 syntax, which I assume becasue you used it in your first post. If you don't mind using the pbasic 2.5 syntax, then what seanwitte posted would work and is a lot simpler.