Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: eldiau on January 26, 2020, 02:24:55 PM

Title: Weird bug in filter "PlayedCount not_contains 0"
Post by: eldiau on January 26, 2020, 02:24:55 PM
I found a very weird bug confirmed on both v2.6.0 and v2.4.1 on linux.
I have a filter:

        filter               Played
                sort_by              PlayedTime
                reverse_order        true
                rule                 PlayedCount not_contains 0


when a game is played exactly 150 times, the next time attract mode is run it doesn't appear in the list anymore, if I edit the .stat file and set the played count to 149 or 151 it is listed again.
Title: Re: Weird bug in filter "PlayedCount not_contains 0"
Post by: progets on January 26, 2020, 07:19:29 PM
Looks like the filter is working exactly how it should.

Maybe you want "not_equals" because a lot of numbers contain 0.

10
20
30
40
50
Title: Re: Weird bug in filter "PlayedCount not_contains 0"
Post by: progets on January 26, 2020, 11:15:20 PM
Good eye on seeing this issue.

I saw the problem pretty quickly once you presented it. The post made me curious and I looked at the WIKI that had the same wrong rule (which I have since updated). My guess is a lot of people are using this flawed rule and don't even know it. It's kind of a big issue when you consider that 10% of numbers contain a 0.
Title: Re: Weird bug in filter "PlayedCount not_contains 0"
Post by: eldiau on January 27, 2020, 12:46:01 AM
I see, "not_contains" is quite self explanatory if you actually read it!
I blindly copied the filter from the wiki, the cut and paste joy!
Sorry I posted it as a an attract mode bug!

Thanks for helping out!