So for some reasons (its happened in multiple things of mine and a friends) anytime we run shell.* it errors and drops out of the program. Any known fix?
Problems with shell API breaking
Started by Cloud Ninja, May 23 2015 12:52 AM
8 replies to this topic
#1
Posted 23 May 2015 - 12:52 AM
#2
Posted 23 May 2015 - 01:43 AM
Chances are it is something you're doing wrong. Please provide code so we can help further.
#3
Posted 23 May 2015 - 01:54 AM
And the error messages, of course. Why bother asking for help if you're not even going to describe your problem?
That said, scripts that you intend to load via os.loadAPI() don't have access to the shell table (or multishell, for that matter), and therefore shouldn't try to reference it.
That said, scripts that you intend to load via os.loadAPI() don't have access to the shell table (or multishell, for that matter), and therefore shouldn't try to reference it.
#4
Posted 23 May 2015 - 02:37 AM
Bomb Bloke, on 23 May 2015 - 01:54 AM, said:
And the error messages, of course. Why bother asking for help if you're not even going to describe your problem?
That said, scripts that you intend to load via os.loadAPI() don't have access to the shell table (or multishell, for that matter), and therefore shouldn't try to reference it.
That said, scripts that you intend to load via os.loadAPI() don't have access to the shell table (or multishell, for that matter), and therefore shouldn't try to reference it.
#5
Posted 23 May 2015 - 03:06 AM
The shell "API" isn't a real API. It would depend on which shell you want to refer to, and APIs have no knowledge of this, nor should they. If you're making an API and you "need" to access the shell from inside it, you're already Doing It Wrong . There are better (actually correct) ways to do whatever is being attempted.
#6
Posted 23 May 2015 - 05:03 AM
Lyqyd, on 23 May 2015 - 03:06 AM, said:
The shell "API" isn't a real API. It would depend on which shell you want to refer to, and APIs have no knowledge of this, nor should they. If you're making an API and you "need" to access the shell from inside it, you're already Doing It Wrong ™. There are better (actually correct) ways to do whatever is being attempted.
#7
Posted 23 May 2015 - 06:38 AM
Then we can't help you further. When you post the code, we can provide more help.
#8
Posted 23 May 2015 - 06:37 PM
Lyqyd, on 23 May 2015 - 06:38 AM, said:
Then we can't help you further. When you post the code, we can provide more help.
#9
Posted 23 May 2015 - 09:16 PM
There's no such file as /rom/apis/shell, because the shell isn't a real API. It's a table that's injected into the environment of programs running inside it, and you could have multiple different instances of it at the same time. For instance, in multishell, if you opened two tabs running the shell program, each of them would have an independent shell table that could be modified independently of the other. Which one should your API use? (Hint: The correct answer is neither of them)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











