Posted 13 March 2012 - 12:11 PM
I'm trying to offload the bulk of my terminal formatting to an API which begins with
tos (API)
My main program calls tos.splash(2);
whenever I run it I get:
tos:2: attempt to index ? (a nil value)
if I remove the shell.run it runs with no issues (just doesn't clear the screen, as you would expect).
I'm guessing it's having trouble seeing the other APIs from within an API, so I tried
Am I missing something or is this just not allowed?
tos (API)
function splash(num)
shell.run("clear");
--rest of the program
end
My main program calls tos.splash(2);
whenever I run it I get:
tos:2: attempt to index ? (a nil value)
if I remove the shell.run it runs with no issues (just doesn't clear the screen, as you would expect).
I'm guessing it's having trouble seeing the other APIs from within an API, so I tried
function splash(num)
os.loadAPI("shell");
shell.run("clear");
--rest of the program
end
which throws the same line 2 error. I also tried os.loadAPI("rom/apis/shell"); with no dice.Am I missing something or is this just not allowed?