Posted 29 April 2012 - 04:50 AM
Doing the following will "break" your in-game "OS".
cd rom => cd help
Due to the fact that it cannot tell the difference between the program you want to use and the help file of that program, you cannot run any default programs.
I came up with a very small fix in the "shell" file that is applied to the "shell.run" function, though you may prefer some other method.
cd rom => cd help
Due to the fact that it cannot tell the difference between the program you want to use and the help file of that program, you cannot run any default programs.
I came up with a very small fix in the "shell" file that is applied to the "shell.run" function, though you may prefer some other method.
function shell.run(_sCommand, ...)
local sPath = shell.resolveProgram(_sCommand)
if sPath ~= nil then
if shell.dir() == "rom/help" then
sPath = string.gsub(sPath, "help", "programs")
end
tProgramStack[#tProgramStack + 1] = sPath
local result = os.run(tEnv, sPath, ...)
tProgramStack[#tProgramStack] = nil
return result
else
print("No such program")
return false
end
end
Another solution would be to add extensions to those files and then add this to the top of "help", you may prefer another method.tArgs = { ... }
tArgs[1] = tArgs[1]..".help"
Also I did not see a topic related to this bug, so if it exists sorry.