Posted 04 March 2014 - 06:05 AM
Im trying to write a program to auto launch turtles. so far it is working ok. except it randomly fails to copy files to the floppy disk. Im debugging this on single player, so there is no server involved.
relevant code:
This sits inside a loop and it will ALWAYS fail at fs.copy() but never in the same iteration. when it fails, the message is always the same:
matrun:83 <path to my mc world>\saves\new world\computer\ <some number> \.\disk\startup Cannot find the file specified
Entire program here: http://pastebin.com/xVZJU8NJ
Ideas and suggestions on how to fix this?
or is there a better way to accomplish the same thing?
relevant code:
turtle.forward()
scr = fs.open("bootstrap","w")
... write stuff to the file ...
scr.close()
sleep(1)
if fs.exists("/disk/startup") then
print("delete /disk/startup")
fs.delete("/disk/startup")
--sleep(3)
end
fs.copy("bootstrap", "/disk/startup")
This sits inside a loop and it will ALWAYS fail at fs.copy() but never in the same iteration. when it fails, the message is always the same:
matrun:83 <path to my mc world>\saves\new world\computer\ <some number> \.\disk\startup Cannot find the file specified
Entire program here: http://pastebin.com/xVZJU8NJ
Ideas and suggestions on how to fix this?
or is there a better way to accomplish the same thing?