I’ve got a code like this:
function waitForResponse() ogsLog("got it") cocos2d.CCScheduler:sharedScheduler():unscheduleScriptFunc("waitForResponse") end function request(url, listener, listenerError, timeout) ogsLog("Requesting:", url) cocos2d.CCScheduler:sharedScheduler():scheduleScriptFunc("waitForResponse", 1.0 / 60, false) end
but all I got in logs is:
Cocos2d: waitForResponse name does not represent a Lua function 2098468
What’s going on with it?
I’ve looked an examples, at hello lua and I cannot see anything wrong with my code
the only difference I can see between my code and hello.lua from HelloLua project is the fact that my code is within a module.
But why would that matter?