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

[Lua][Question] Shell API application

Started by itsme, 12 September 2012 - 10:23 AM
itsme #1
Posted 12 September 2012 - 12:23 PM
Hello!

Is there any method to use the Shell API in my own API file?

If I try to use it (e.g. src = shell.getRunningProgram()) I receive the following error message: "attempt to index ? (a nil value)"

Thanks
KaoS #2
Posted 12 September 2012 - 12:45 PM
you can include it in a program. not an API, if you define the function shell.getRunningProgram() then it will work (IT MUST NOT BE A LOCAL FUNCTION)