Runtime error comparision

Then use the buildin block please.
I found this bug previously also, but have no idea for how to fix it :sweat_smile:

ok, how i have to sort it? what blocks buildin

Screenshot_20230408_212317
put your comparator in if socket

image
what to put in x and x2

x-item1 x2-item2

in fact no procedure needed here.

ok, thx

image
image

show original list and sorted list on labels and see if it's sorted.

sorted
image
not sorted
image

how did you show a list? do not use a loop.


thats all my blocks for this

set label1.text to origin list

label2.text to sorted list

do not use loop


I am not getting any error with this extension:
test.aia (13.4 KB)

Use like this:

EDIT: I corrected because it was 2x item1. Although it also worked...

3 Likes

Sorry, this is not right.
the if socket need a boolean value, not a number.

I don't see any one mentioning the " " around 0 in the scores column, missing from the non-zero numbers.

Could they be messing up the sort of column 2, by imposing string comparisons ('11' < '9') instead of numeric comparisons?

Right, and you can see that he uses "0" in his app. In total, he could use 0 and it won't be a problem.

In your app you are using this block with String value:

blocks - 2023-04-09T013906.107

Use integer value:

blocks - 2023-04-09T013918.200

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.