[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: calling fcuntion from other lua context
- From: Mario <www.derfordfahrer@...>
- Date: Thu, 01 Sep 2005 08:18:21 +0200
Hi all!
I have some c++ objects, all with their own lua context. How is it
possible to call a lua function from one lua context to an another one?
For example:
script 1:
function CObject:OnLogic( )
local a = wmanager:getEntityByName( "NewObject" );
a:some_function( )
end
script 2:
function CObject:OnLogic( )
-- do nothing
end
function CObject:some_function( )
io.write("Hi there!\n")
end
I'm getting the error message "attempt to call method `some_function' (a
nil value)"?
Thank you in advance!
Greetings Mario