forked from github/server
getn is deprecated
This commit is contained in:
parent
fa3abe8c32
commit
52f08917d5
|
@ -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])
|
||||||
|
|
|
@ -32,7 +32,10 @@
|
||||||
#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