lua-users home
lua-l archive

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


Hello, everyone!
I am integrating Lua to my application, a game.  I need stop the script running at some point, and resume at some time. I mean that lua script will call some C function defined by the game, the function will start a task, then the script must wait for the task, when the task finished the script will resume. For example:
 
ok=MessageBox("are you ok?");
-- need stop script to waiting for user input here
if ok then
    DoSomething();
else
    DoSomethingElse();
end
 
I try to call "lua_yield" in MessageBox() C function,but get an error "attempt do yield across metamethod/C-call boundary".
 
Any comments please. thanks.