Original Post
Hi.I''ve managed to create an engine wich unify all it''s parts through a console wich is using lua to manage the rest.I have some lua threads(lua_State * pointers) in each of the engine parts(renderer, input system, etc) in wich i execute specific commands.my problem is:i want to switch through this pointers so one of it and only one should be active at a given time.so let''s say i have:
lua_State * x1;
lua_State * x2;//both of them are initialized and are running
//command whenever i want
//and i have
lua_State * current = NULL;
What I want is to do operations like
current = x1;
or
current = x2;
and to run the commands in the current thread.so the idea is so i can switch between the states.the build of the project runs ok but the problem appears on execution where i get an error:
adress "an address in hexa of the specified thread" cannot be "read".so why''s that and how can i assign to my "current" pointer one of the other pointers.Normally it should work cause they have the same type, but it doesn''t..
please help
Mihai