Closed UltraEngine closed 6 months ago
I want to make a table with functions added to it, to act as a namespace. Can anyone tell me how to do this correctly?:
void BindCommands(sol::state* L) { sol::table t; t["Initialize"] = Steamworks::Initialize; t["Shutdown"] = Steamworks::Shutdown; t["Update"] = Steamworks::Update; L->set("Steamworks", t); }
Usage in Lua:
Steamworks.Initialize() Steamworks.Update() Steamworks.Shutdown()
There is always way with sol...
void BindCommands(sol::state* L) { sol::table t(*L, sol::create);
:)
I want to make a table with functions added to it, to act as a namespace. Can anyone tell me how to do this correctly?:
Usage in Lua: