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.
Screenshots/video: https://c.gethopscotch.com/p/12y4mzptdo
Player version 2.2.0
9 Likes
That definitely is problematic – thanks for making the report. We’re working on this:
3 Likes
This should be fixed now in webplayer 2.2.1 (just released)
3 Likes
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
3 Likes
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
3 Likes
Thanks, wish I didn’t spend like an hour coding a workaround lol haha haha help
3 Likes
Did I do it correctly or did I not because it doesn’t show up
3 Likes
oh you can only do that from your draft unfortunately
3 Likes
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
3 Likes
Oh good, the comparison thing is the issue
3 Likes
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
1 Like
This should be fixed for variables in comparison operators too now.
1 Like
(i just tested it and i can confirm ^^)
1 Like
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.