View difference between Paste ID: mhYBnDHr and f4JkZR2q
SHOW: | | - or go back to the newest paste.
1
behavior_table = {}
2
3
behavior_table.doOne = function()
4
	print('lua do a function one')
5
end
6
7-
behavior_table.customVar = 3
7+
8
	print("Length:", array.length) -- Prints array length correctly
9
	print(array) -- Prints the array using toString(), resulting in [Ljava.lang.Object;@2d363fb3
10-
	print(behavior_table.customVar)
10+
11-
	print("Length:", array.length)
11+
12
	array[0] = 4 -- Throws a LuaError: index expected, got userdata
13
	print(array[0]) -- prints 'nil'
14
	print(Array.get(Coerce.coerce(array), 0)) -- Throws a NullPointerException
15
end
16
17
lua_behavior = luajava.createProxy("experiment.Bobject", behavior_table)
18
19
return lua_behavior