1 sentence description of the problem: If you make a variable that contains a number, even if you never set it to a string, and use it as input to a block that makes sense for both types, such as min, max, >, <, etc. it will use it as a string. While this does sort of make sense knowing how the player saves variables, it does not make sense to the user at all.
Steps to reproduce the problem every time:
- Create two variables and set them to numbers such that a comparison between them will be different depending on if they are strings or numbers (for example, 10 and 6, which will return 10 being the greatest if they are numbers and 6 being the greatest if they are strings)
- Compare them.
I expected this to happen: The variables to be compared as numbers
But instead this happened: They were compared as strings.
Player version 2.2.0
That definitely is problematic – thanks for making the report. We’re working on this:
This should be fixed now in webplayer 2.2.1 (just released)
Omg this bug is driving me nuts! I have to do a million more annoying things now to make my game just work when I update it, glad this is high priority
It’s still glitching for me
you need to update your project
hopscotch (not the app store) > three dots > update to latest player
warning! this may break your project - make sure to keep a backup
Thanks, wish I didn’t spend like an hour coding a workaround lol haha haha help
Did I do it correctly or did I not because it doesn’t show up
oh you can only do that from your draft unfortunately
There’s still an edge case with variables not being compared correctly when used in comparison operators (< >) so we will update the webplayer again.
If your project is already on 2.2.x, it will update automatically to use the latest 2.2.x – so you won’t need to do anything to update to latest player
Oh good, the comparison thing is the issue
yea i noticed that with my fractionator project, i had to round a variable (local var in my case if thats helpful) to make it properly compare
This should be fixed for variables in comparison operators too now.
(i just tested it and i can confirm ^^)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.