forgot to init the bindings for game.pkg

next problem to solve: skills
This commit is contained in:
Enno Rehling 2014-06-17 23:50:13 -07:00
parent 3625ba6a95
commit eb567918e5
3 changed files with 5 additions and 2 deletions

View File

@ -90,10 +90,11 @@ set(SERVER_SRC
console.c
helpers.c
config.pkg.c
eressea.pkg.c
game.pkg.c
locale.pkg.c
log.pkg.c
process.pkg.c
eressea.pkg.c
settings.pkg.c
bind_building.c
bind_config.c

View File

@ -88,6 +88,7 @@ TOLUA_PKG(settings);
TOLUA_PKG(config);
TOLUA_PKG(locale);
TOLUA_PKG(log);
TOLUA_PKG(game);
int log_lua_error(lua_State * L)
{
@ -1060,6 +1061,7 @@ int tolua_bindings_open(lua_State * L)
tolua_eressea_open(L);
tolua_process_open(L);
tolua_settings_open(L);
tolua_game_open(L);
tolua_config_open(L);
tolua_locale_open(L);
tolua_log_open(L);

View File

@ -1256,7 +1256,7 @@ skill_t findskill(const char *s, const struct locale * lang)
const void * match;
void **tokens = get_translations(lang, UT_SKILLS);
struct critbit_tree *cb = (critbit_tree *)*tokens;
if (cb_find_prefix(cb, str, strlen(str), &match, 1, 0)) {
if (cb && cb_find_prefix(cb, str, strlen(str), &match, 1, 0)) {
cb_get_kv(match, &i, sizeof(int));
result = (skill_t)i;
}