lua-users home
lua-l archive

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

> I apologise if this is either a stupid question, or has been asked
> before, but I was wondering if there was a way that I haven't found of
> calling functions of one state from within a lua script of another?  I
> have several states all started with lua_newthread() all of which run
> their own scripts.

I'm probably missing something here, but if all Lua states descend from a
single parent state (ie, have been created with lua_newthread), I see no
problem calling functions across states. In C, you can simply use lua_xmove
to send a function from one state to another.