• Need a little help with modules and lua
    0 replies, posted
I am trying to run a console command from a c++ module, currently I have int conTest(lua_State* state) { LUA->GetField(-1, "RunConsoleCommand"); LUA->PushString("say"); LUA->PushString("test"); LUA->Call(1, 0); return 0; } and the I add it to a table so i can run it as a function in game, however when i run the function i get this error: Player [19][Some_Beach] ERR: attempt to index a number value What is causing this? What am I doing wrong?
Sorry, you need to Log In to post a reply to this thread.