lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hey list,
This seems like a simple thing to do, but I can't seem to get it to work or find the answer. You can call dofile in a script to load and execute the main body of another script, and you can call loadfile to load the main body into a function and run it upon a function call; but I can't seem to find a way to call a function that is registered in another such script. I have also tried using require, but I don't know enough about lua packages to properly set it up and call the function. How do you go about calling a function from another script in a running script? Is there a way through Lua directly? Routing it thru c++ isn't an option, because it's not always known what user types have to be pushed onto the stack (we're using a lot of different types).