Lua binding with Box2d error but same lua binding with cocos2dx works .. using toLua++ ,Box2D and Cocos2DX


#1

Cocos2d: [LUA ERROR] …0787-A901-4EB4-B11C-DD551DCE6102/Greed.app/hello.lua:22: attempt to call global ‘b2AABB’ (a nil value)

any help will be highly appreciated …


#2

Dax,

Can you show your Lua code? b2AABB appears to only be returned by objects which use it, so if you are attempting to create one yourself I don’t think that’s supported; see functions associated with b2aabb in LuaBox2d.cpp by searching for this “tolua_cclass(tolua_S,”b2AABB“,”b2AABB“,”“,NULL);” in that file.