Hello, I have an array where there are 4 choices presented 4 different times. I want to do something based on the most frequently-selected choice.
Using a conditional branch I'm able to use variations of the following, which returns the correct result when one choice has more selections than the others.
$gameVariables.value(21) > $gameVariables.value(22) && $gameVariables.value(21) > $gameVariables.value(23) && $gameVariables.value(21) > $gameVariables.value(24)
Else
$gameVariables.value(22) > $gameVariables.value(21) && $gameVariables.value(22) > $gameVariables.value(23) && $gameVariables.value(22) > $gameVariables.value(24)
And so on.
The problem is when there are two choices that were selected the same amount of times. I am using the following, which I hope would check if variable 21 and 22 are equal and also greater than the other variables. But the game doesn't return a result:
$gameVariables.value(21) == $gameVariables.value(22) && $gameVariables.value(21) > $gameVariables.value(23) && $gameVariables.value(21) > $gameVariables.value(24)
What am I doing wrong? Thanks in advance!
Using a conditional branch I'm able to use variations of the following, which returns the correct result when one choice has more selections than the others.
$gameVariables.value(21) > $gameVariables.value(22) && $gameVariables.value(21) > $gameVariables.value(23) && $gameVariables.value(21) > $gameVariables.value(24)
Else
$gameVariables.value(22) > $gameVariables.value(21) && $gameVariables.value(22) > $gameVariables.value(23) && $gameVariables.value(22) > $gameVariables.value(24)
And so on.
The problem is when there are two choices that were selected the same amount of times. I am using the following, which I hope would check if variable 21 and 22 are equal and also greater than the other variables. But the game doesn't return a result:
$gameVariables.value(21) == $gameVariables.value(22) && $gameVariables.value(21) > $gameVariables.value(23) && $gameVariables.value(21) > $gameVariables.value(24)
What am I doing wrong? Thanks in advance!