How to use ccArray in cocos2d-x3.0 lua

How to use ccArray in cocos2d-x3.0 lua
0.0 0


I use CCArray in cocos2d-x3.0 lua
like this
local bulletArray = cc.Array:create()

why log had this output to me “cocos2d: [LUA-print] LUA ERROR: [string”BulletPlayer.lua“]:6: attempt to index field ‘Array’ (a nil value)” ?

whether i have use mistake ?


since cocos2d-x-3.0 supports LUA table as array directly. no need to create CCArray anymore. just pass LUA table instead of CCArray.

check out for your reference.


Edward Zhou thanks


It seems that pass lua’s table to cc.Sequence is not OK


use LUA nature
local seq = cc.Sequence:create( action1, action2, action3 …. )

or you like table in this way
local actions = {action1, action2, action3, ……}
local seq = cc.Sequence:create( unpack(actions) )

please check out for your reference