diff --git a/stepmania/src/LuaBinding.h b/stepmania/src/LuaBinding.h index ac95b309bc..9e24d56529 100644 --- a/stepmania/src/LuaBinding.h +++ b/stepmania/src/LuaBinding.h @@ -54,10 +54,9 @@ protected: for( unsigned i=0; i < m_aMethods.size(); i++ ) { const RegType *l = &m_aMethods[i]; - lua_pushstring( L, l->szName ); lua_pushlightuserdata( L, (void*) l->mfunc ); lua_pushcclosure( L, thunk, 1 ); - lua_settable( L, iMethods ); + lua_setfield( L, iMethods, l->szName ); } }