ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: finalER2000 on Jul 06, 2025, 07:40 AM

Title: require does not exists in new multishell tab
Post by: finalER2000 on Jul 06, 2025, 07:40 AM
after creating new tab all standard things like require do this
Title: require does not exists in new multishell tab
Post by: hhoy on Oct 31, 2025, 01:56 PM
Its because multishell.launch() runs an app that does not have SHELL so you need to use shell.openTab() to open the app with shell because require is a function of shell. you can also use dofile(AbsolutePathOfFile)
Title: require does not exists in new multishell tab
Post by: NeonKatVT on Nov 13, 2025, 08:21 PM
Quote from: hhoy on Oct 31, 2025, 01:56 PM
Quote from: finalER2000 on Jul 06, 2025, 07:40 AMafter creating new tab all standard things like require do this

Its because multishell.launch() runs an app that does not have SHELL so you need to use shell.openTab() to open the app with shell because require is a function of shell. you can also use dofile(AbsolutePathOfFile)

Yes. multishell.launch is similar to os.run. The best choice to use is multishell.newTab which does the same thing with the multishell like shell.run does. Change it to shell.newTab and the error will go away.