forked from github/server
getn is deprecated
This commit is contained in:
parent
e58f51e536
commit
f06fd8945c
|
@ -23,7 +23,7 @@ function test_get_allies()
|
||||||
assert_equal(0, #allies)
|
assert_equal(0, #allies)
|
||||||
f1:set_ally(f2, "give", true)
|
f1:set_ally(f2, "give", true)
|
||||||
allies = f1.allies
|
allies = f1.allies
|
||||||
assert_not_nil(1, table.getn(allies))
|
assert_not_nil(allies[f2.id])
|
||||||
assert_equal('table', type(allies[f2.id]))
|
assert_equal('table', type(allies[f2.id]))
|
||||||
assert_equal(1, #allies[f2.id])
|
assert_equal(1, #allies[f2.id])
|
||||||
assert_equal("give", allies[f2.id][1])
|
assert_equal("give", allies[f2.id][1])
|
||||||
|
|
|
@ -43,7 +43,10 @@ without prior permission by the authors of Eressea.
|
||||||
#include <lauxlib.h>
|
#include <lauxlib.h>
|
||||||
#include <tolua.h>
|
#include <tolua.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdbool.h> // for bool
|
||||||
|
#include <stdio.h> // for puts
|
||||||
|
|
||||||
|
struct allies;
|
||||||
|
|
||||||
int tolua_factionlist_next(lua_State * L)
|
int tolua_factionlist_next(lua_State * L)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue