View Single Post
  #1   Spotlight this post!  
Unread 31-01-2003, 08:46
powercat powercat is offline
Registered User
no team
 
Join Date: Jan 2003
Location: Kansas
Posts: 14
powercat is an unknown quantity at this point
PBasic Select Problem

Greetings,
I have chosen to use the new
SELECT construct in PBasic. Here
is the code fragment:

'Dead Reckoning Code
Select stepnum
CASE 0 : gosub go_home
CASE 1 : gosub go_home2
CASE 2 : if rc_sw3 = UP & rc_sw4 = UP then
gosub go_left
else
gosub go_right
CASE 3 : gosub go_forward
CASE 4 : if rc_sw3 = UP & rc_sw4 = UP then
gosub go_left
else
gosub go_right
CASE 5 : gosub go_longforward
ENDSELECT

When I check syntax, it always highlights the stepnum variable and provide the following error:

Expected ':' or end-of-line
Error: 129-Expected ':' or end-of-line

What causes this error ? Searched and couldn't find anything.

Am running the 2.0 beta 1 editor. It acts like it doesn't understand the new language features.

thanks in advance.