Sound Servo (PC Speaker) icon Sound Servo (PC Speaker) — Maps PC audio volume to servos in real time with scalar, min/max, invert & multi-servo options-ideal for syncing robot mouth to sound Try it →
Asked — Edited
Goto Last Loop Variable Goto + Variable Goto($variable)

Goto Last Loop Variable Goto + Variable Goto($Variable)

Has anyone figured out way to get the goto() function to work with variable so it can goto the last defined loop such as this :

 $lastLoop = ""

:loop1
$last = "loop1"

left(200, 0)
sleep(100)

print($last)

goto($last)   

this would allow to have the equivalent to calling a function and resuming the current loop after its execution. It would prevent me from using too many scripts and avoid lots of redundancies. My project currently has 50 scripts so I'm trying to find a way to shrink this number. :P


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.