Posted 16 January 2014 - 12:57 PM
I am trying to get the computers on my server to auto boot a specific script housed in a specific folder. I tried setting it up in the bios.lua, and the startup file within the rom but it does not seem to work. When I started digging into it I found I got the above message. Here is the code that I have as of right now:
The error comes up on this line
Any help would be greatly appreciated.
EDIT: forgot to say I'm using ComputerCraft 1.58
overridesPath = "/rom/<folder>/overrides"
--folder holds files with a single word on line 1, word is the name of the program I want to run
overScriptsPath = "/rom/<folder>/scripts"
--location of all scripts that will run
customScriptsExists = fs.exists(overridesPath..os.getComputerID())
if customScriptExists then
local customScripts = io.open(overridesPath..os.getComputerID(), "r")
local scriptToRun = customScripts:read()
while scriptToRun do
if (fs.exists(overScriptsPath..scriptToRun)) then
os.run( {}, overScriptsPath..scriptToRun)
else
print("Script "..scriptToRun.." for ID "..os.getComputerID().." does not exist. Please contact an Admin." )
end
end
end
The error comes up on this line
customScriptsExists = fs.exists(overridesPath..os.getComputerID())
Any help would be greatly appreciated.
EDIT: forgot to say I'm using ComputerCraft 1.58
Edited on 16 January 2014 - 11:59 AM