MCPcopy Create free account
hub / github.com/CelestiaProject/Celestia / GetLuaTableEntry

Function GetLuaTableEntry

src/celengine/scriptobject.cpp:62–71  ·  view source on GitHub ↗

! Helper function to retrieve an entry from a table and leave * it on the top of the stack. */

Source from the content-addressed store, hash-verified

60 * it on the top of the stack.
61 */
62void
63GetLuaTableEntry(lua_State* state,
64 int tableIndex,
65 const string& key)
66{
67 lua_pushvalue(state, tableIndex);
68 lua_pushstring(state, key.c_str());
69 lua_gettable(state, -2);
70 lua_remove(state, -2);
71}
72
73
74/*! Helper function to retrieve a number value from a table; returns

Callers 1

SafeGetLuaNumberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected