Original Post
When I try to make a class dealign with Lua, like so: class cScript { public: lua_State* Setup(); void DoFile(const char*); void Close(); private: lua_State* Lua; }; Passing the Lua var created in my setup function causes an execption. So to get round it, I have to have the Setup() func return the lua_state, so that the programmer can pass it on into each function they call, which is tedious and I'd prefer to have it self contained. I'm quite new so I've probably missed something fundamental out, but if anyone could tell me what Im doing wrong it would be great cheers