local sp = cc.Sprite:create(“res/Images/Building/b00.png”);
local button = GameGetCsbNode.seekNodeByName(self, “Button_1”, “Button”);
if(button)then
button:addClickEventListener(function(sender)
print(“click”)
self:addChild(sp);
…
这样的话会报错
click
Warning: cc.Node:addChild argument 2 is invalid native object(nullptr)
ASSERT FAILED ON LUA EXECUTE: Argument must be non-nil
stack traceback:
怎么解决要