Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type error if timer delay is an integer #14

Open
ewot opened this issue Nov 1, 2014 · 0 comments
Open

type error if timer delay is an integer #14

ewot opened this issue Nov 1, 2014 · 0 comments

Comments

@ewot
Copy link

ewot commented Nov 1, 2014

The timer crashes with a type error when triggered if the given delay is an integer.

The property Timer._newTick should be a num or the calculated value should be converted to a double when updating it. Or the Timer.add() should take a double and not a num.

To reproduce:

timer = game.time.create();
TimerEvent te = timer.add(1000, () => print("timer called"));

This will crash after 1000ms with: type 'int' is not a subtype of type 'double' of 'value'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant