! Helper function to retrieve an entry from a table and leave * it on the top of the stack. */
| 60 | * it on the top of the stack. |
| 61 | */ |
| 62 | void |
| 63 | GetLuaTableEntry(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 |