lua-users home
lua-l archive

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


I am trying to change script files from within the script file. My lua files are structured like this:

[room1.lua]
function Main()
end

function Init()
end

function Exit()
end
--end of file


I have a C function that loads a new lua file and runs the Init function in it. In my main loop, I just keep calling the Init function. Is there any danger in jumping into another file right in the middle of the function?? Would it be better if I did: lua_dostring( script, "return" ), before I load the next file??

Denis Lamarche

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com