This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
truhgoj's profile picture

[ERROR] "File not found"

Started by truhgoj, 09 October 2012 - 08:48 PM
truhgoj #1
Posted 09 October 2012 - 10:48 PM
I put this script http://www.computerc...ram-for-turtle/ on one of my miningturtles named it "goto" and saved it in the root directory.

Now I'm trying to access this script with os.run.
When I'm typing os.run("goto", "123", "65", "1234") in the interactive lua interpreter it gives me the ecxeption

File not found.
false
The same when I' trying to do this from a script.

Can somebody help me?
faubiguy #2
Posted 09 October 2012 - 10:52 PM
When using os.run, the first argument should be a table with any global variables you want to pass to the program being run. The second argument specifies the file to run, so it can't find the file "123". You probably want to use shell.run instead of os.run, which just runs the program.
Lyqyd #3
Posted 10 October 2012 - 01:29 AM
Or just type goto 123 65 1234 into the shell itself, which would run the program.
truhgoj #4
Posted 10 October 2012 - 11:46 AM
When using os.run, the first argument should be a table with any global variables you want to pass to the program being run. The second argument specifies the file to run, so it can't find the file "123". You probably want to use shell.run instead of os.run, which just runs the program.
thx shell.run works fine!

Or just type goto 123 65 1234 into the shell itself, which would run the program.
I'm trying to use the script from another script in long term