diff --git a/src/bind_faction.c b/src/bind_faction.c index 07121d530..ada69f12b 100644 --- a/src/bind_faction.c +++ b/src/bind_faction.c @@ -260,7 +260,7 @@ static int tolua_faction_debug_messages(lua_State * L) int i = 1; if (f->msgs) { mlist *ml; - for (ml = self->msgs->begin; ml; ml = ml->next, ++i) { + for (ml = f->msgs->begin; ml; ml = ml->next, ++i) { char buf[120]; nr_render(ml->msg, default_locale, buf, sizeof(buf), NULL); puts(buf); diff --git a/src/bind_faction.h b/src/bind_faction.h index aed077f10..8f1255e65 100644 --- a/src/bind_faction.h +++ b/src/bind_faction.h @@ -1,8 +1,11 @@ +#pragma once + +struct lua_State; + #ifdef __cplusplus extern "C" { #endif - struct lua_State; int tolua_factionlist_next(struct lua_State *L); void tolua_faction_open(struct lua_State *L);