So I built a drone, and finally managed to get a custom bios running for test purposes. The problem is that I can't seem to get it to sleep (so that a move command can finish). Each time I try, I get the following error:
bios:6: attempt to call field 'sleep' (a nil value)
The code I'm using is:
--local os = require("os")
local drone = component.proxy(component.list("drone")())
while true do
drone.move(1,1,1)
--print("zomgwtf")
os.sleep(1)
drone.move(-1,-1,-1)
end
(The print and require statements were leftovers of various debugging attempts.)
There's got to be a way to sleep right? Drones are going to need to wait sometimes, but there doesn't seem to be any function to do that. I know the sleep command works, since os.sleep works on a computer when placed in a script, and thus there's no live lua interpreter magic going on when calling sleep. What's up here?
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.
So I built a drone, and finally managed to get a custom bios running for test purposes. The problem is that I can't seem to get it to sleep (so that a move command can finish). Each time I try, I get the following error:
The code I'm using is:
(The print and require statements were leftovers of various debugging attempts.)
There's got to be a way to sleep right? Drones are going to need to wait sometimes, but there doesn't seem to be any function to do that. I know the sleep command works, since os.sleep works on a computer when placed in a script, and thus there's no live lua interpreter magic going on when calling sleep. What's up here?
Edit: Version info:
Minecraft 1.7.10
Forge: 10.13.2.1240
OpenComputers:1.5.8.17
Edited by AliceTheGorgonLink to post
Share on other sites