cPluginManager:GetLuaPlugin() and lua_State
#2
lua_State is automagically passed when you call a function from Lua. Or something like that..
But even if you did get a plugin reference, you still can't call Lua functions on it ( you can call the c++ functions, but why would you )

All plugins have their own 'sandboxed' lua_State (own stack, memory, etc.) which means they cannot interact with each other in a normal fashion.

I don't think you can easily forward Lua functions with any number of arguments/return values called from one state to the other.
The easiest way is to add a generic function to plugins that accepts a string and returns a string
Reply
Thanks given by:


Messages In This Thread
RE: cPluginManager:GetLuaPlugin() and lua_State - by FakeTruth - 06-07-2012, 03:32 AM



Users browsing this thread: 2 Guest(s)