Page 1 of 1

[Bug?] Options that depend on other options

Posted: 07 June 2020, 22:01
by LaszloK
This is perhaps a bit of an esoteric scenario, but it seemed to work... until it didn't. My main question is, am I getting something wrong, or is what I'm trying to do unsupported?

Here's what I tried in Tarokk (a card game):

Option 105 allows you to pick a directed deal, i.e. after shuffling and dealing, the server checks that certain situations should or should not occur, and automatically redeals otherwise.

Naturally, this is only available when in training mode ("otheroption", 201). In normal mode, a fully random deal occurs, and that's it.

Some other options are in turn disabled when you're going for a directed deal. Thus they have "otheroption", 105 as their display condition.

Which is assuming that 105 is going to take the first possible value (0 = off) when it isn't shown at all. And that's how it worked when I tried it, so I made the change part of my next build, now deployed.

Feedback today suggests otherwise, however: if you pick normal mode, the option for directed deals doesn't show up (expected so far) but the ones that require directed deals to be off are hidden too. Which suggests that it's set to something other than 0, and not even visible.

Oddly, this is also what it does on the studio now, even though I swear it worked as intended two days ago!

Has anyone got experience with situations like this, or a suggestion to resolve it?

Re: [Bug?] Options that depend on other options

Posted: 08 June 2020, 13:27
by LaszloK
I think I've managed to resolve this by explicitly setting the display condition on the options involved to "105 is 0 OR 201 is not 1". However, it's still odd that it would behave differently without any code changes. To be entirely safe, I've added code to check if 201 is not 1 and in that case, explicitly set 105 (which isn't supposed to be shown) to 0.