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

ontimer block seems to break with expressions #104

Open
FAReTek1 opened this issue Feb 23, 2025 · 0 comments
Open

ontimer block seems to break with expressions #104

FAReTek1 opened this issue Feb 23, 2025 · 0 comments

Comments

@FAReTek1
Copy link

When using the ontimer keyword, it works so long as the input is only a literal value or a variable. However, once I place a + sign, the code compiles incorrectly.

Here is some sample code. it simply takes an input and waits for that long - 5 seconds using the timer functionality of scratch.

costumes "blank.svg";

onflag {
    time = "Infinity";
    ask "wait how long?";
    time = answer();
    reset_timer;
}

ontimer > time - 5 {
    say "beep! timer finished!", 2;
    think "...i pre-emptively beeped 5 seconds early..hehe";
}

However, when opening in turbowarp, the ontimer script is nowhere to be seen.

Upon inspecting the project.json file, i am greeted by the subtract block and the 'whengreaterthan' blocks having the same block ID.

Image

That seems to be what causes the issue.

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