Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module found #332

Open
rivenblades opened this issue Oct 25, 2024 · 0 comments
Open

No module found #332

rivenblades opened this issue Oct 25, 2024 · 0 comments

Comments

@rivenblades
Copy link

rivenblades commented Oct 25, 2024

i have a simple luaTest.lua file that requires another simple point.lua file.
both are in same directory of unity( inside Assets)
it doesnt find the other file as a module(poin.lua)
luaTest.lua is:

package.path = './?.lua';
package.path = package.path .. 'D:\\Business\\BadBoy\\Assets\\luaTest.lua;';
require ('point');
print("Hello world")

point.lua is:

let point = {}
print("Skaseee")
return `point`

when i do

public string code;
Script script = new Script();
script.DoString(code);

it says ScriptRuntimeException: module 'point' not found
MoonSharp.Interpreter.Script.RequireModule (System.String modname, MoonSharp.Interpreter.Table globalContext) (at Assets/Plugins/MoonSharp/Interpreter/Script.cs:633)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant