Scheduler in cocos2d-x v3.4

In v3.3 everything works fine. After the 3.4 update (which was not so smooth…) I get following error in the cocos code ide console after using scheduleScriptFunc.

Assert failed: Invalid script event.
Assert failed: Invalid script event.
Assert failed: Invalid script event.
Assert failed: Invalid script event.

I used it like this

cc.Director:getInstance():getScheduler():scheduleScriptFunc(func,0.5,false)

Another question:

why is schedule(node, callback, delay) in deprecated.lua AND in extern.lua?

The same in here.
I search for any documentation about this but i dont found anything.
you could solve the problem?

I was able to use schedule(…).

@Michael,@DevWario, can you give me the simple demo to reproduct it . I also will check it.
schedule(node, callback, delay) in deprecated.lua and in extern.lua
@Michael, I think it is a bug by careless, it should place in deprecated.lua.

Hi @samuele3hu,
Thanks for help.
In my game i got a method scheduled to run and create the movement.

 local function update(dt)
        sprite:setPosition(sprite:getPositionX()+self.velocity, sprite:getPositionY())
        self.voidNode:setPosition(self.getViewPointCenter(cc.p(zombie:getPositionX(),centerOfView.y)))
    end

when i register the schedule with the method below i got the same error that @Michael.

 scheduler:scheduleScriptFunc(update,0, false)

or

self.layer:scheduleUpdateWithPriorityLua(update,0)

i got the same error:

Assert failed: Invalid script event.
Assert failed: Invalid script event.
Assert failed: Invalid script event.

This error only ocurred when i change the version of cocos2d-x from 3.3 to 3.4.

Same problem here.

Same problem here…

Can someone pls give an answer?
It’s getting ridiculous. If there is a bug, just say it! If something is forgotten, just say it! But please don’t ignore it.

1 Like

Well, it’s fixed in final 3.4

nope, it’s not. I am using 3.4 final …

1 Like

It’s very critical issue…

Nobody here?

issue is resolved…

i dont know what i did exactly.

  1. Download Cocos v2.1 beta.
  2. Go to Cocos Store.
  3. Download Cocos Framework. (NOT Cocos2d-x v3.4)
  4. Setting Cocos IDE.
  5. Perfectly fine…

I don’t want to use cocos framework.
I want to use cocos engine.