64Views1Replies

Author Options:

simulation error? Answered

main:irin [1000,main],C.3,b0
if b0=16 then ahead
if b0=18 then right
if b0=19 then left



ahead:high C.0,B.5 ,C.1,B.4
pause 300
goto main

right: high B.5,B.4
pause 300
goto main

left: high C.0,C.1
pause 300
goto main


this is the code when i try to simulate it  the programming editor says variable not found can you please tell me the reason

Tags:vb

Discussions

0
None
rickharris

Best Answer 7 years ago

It would be really helpful to people if you tell all the story - IE this is a Picaxe, Which Picaxe your using what the program is supposed to do etc.

Only 20x2 and above use Irin so that's the fist thing that may be wrong - ensure the sim is set for that.

The first line is incorrect - The program below runs.

main:

irin [1000,main],3,b0
if b0=16 then ahead
if b0=18 then right
if b0=19 then left

ahead:high C.0,B.5 ,C.1,B.4
pause 300
goto main

right: high B.5,B.4
pause 300
goto main

left: high C.0,C.1
pause 300
goto main