diff options
author | deva <deva> | 2011-07-01 10:02:42 +0000 |
---|---|---|
committer | deva <deva> | 2011-07-01 10:02:42 +0000 |
commit | 42e43b044ffc49e3128ae59e75ce5ffd84c371be (patch) | |
tree | 013b7f5a3134d6dd97ef23adb524c3ba4e5d5bf2 /server/src/luautil.h | |
parent | 0a9bb105ff1534868886e68e3309aabc6c0315c0 (diff) |
Fixed bug in field check/creation with depth greater than 1.
Diffstat (limited to 'server/src/luautil.h')
-rw-r--r-- | server/src/luautil.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/src/luautil.h b/server/src/luautil.h index ebbba45..0d9d445 100644 --- a/server/src/luautil.h +++ b/server/src/luautil.h @@ -31,6 +31,7 @@ #include <lauxlib.h> #include <string> +#include <vector> namespace Pracro { @@ -76,6 +77,18 @@ namespace Pracro { // int checkParameters(lua_State *L, types_t types[]); int checkParameters(lua_State *L, ...); + bool hasField(lua_State *L, int i, std::string name); + + bool testField(lua_State *L, std::vector<std::string> groups, + std::string field); + + bool getField(lua_State *L, std::vector<std::string> groups, + std::string field); + + bool createField(lua_State *L, std::vector<std::string> groups, + std::string field); + + void stack(lua_State* l, const char *fmt, ...); }; #endif/*__PRACRO_LUAUTIL_H__*/ |