I'm attempting to write my first programs for a robot, but I'm running into a wall (figuratively). I wrote the following test script and saved it on a floppy:
for i=0,10 do
robot.forward()
end
for i=0,10 do
robot.back()
end
The floppy is mounted in the robot, but whenever I attempt to execute it, I receive this error:
/mnt/fa8/robot_sandbox.lua:2: attempt to index global 'robot' (a nil value)
If I run it manually after running lua directly, it runs fine. What am I missing? Do I need an import of some sort in the script?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I'm attempting to write my first programs for a robot, but I'm running into a wall (figuratively). I wrote the following test script and saved it on a floppy:
The floppy is mounted in the robot, but whenever I attempt to execute it, I receive this error:
If I run it manually after running lua directly, it runs fine. What am I missing? Do I need an import of some sort in the script?
Link to post
Share on other sites