[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Calling functions in other states
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 15 Nov 2007 18:48:13 -0200
> 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.