Comparing numbers?

I’ve added a minor competition to bit my game where the player can win a prize by playing a darts mini-game. The problem is that I can’t work out how to determine the winner or looser. All I really need to do to finish it is a way to compare the points total for each of three players and determine if the player has the highest score. Can anyone help? :stuck_out_tongue:

If the score of the player is higher than the score of Alice and the score of the player is higher than the score of Bob...

Messy but functional.

Unfortunately it doesn’t seem to be working. I’m not sure why - all I did was replace the names of the variables and characters. Would it matter if the opponents variables were attached to them but the player’s was global? It says it was expecting to read a condition, if that helps.

What does the condition look like when you swap out the variables?

It just looks like:

If the Dart_Tot_P is higher than the Dart_Tot of Char_Barman

Draconis misspoke. “Higher than” is not acceptable I7 grammar. “Greater than” is. So you can say:

If the Dart_Tot_P is greater than the Dart_Tot of Char_Barman

If you prefer some succinctness, you could also use “>” instead of “is greater than”.

Thanks guys, that line seems to work now! I still have a bit of a problem though, what should I do if that fails because the player has tied for first place? Inform doesn’t seem to recognise ‘equal to’ or ‘=’ or ‘The same as’, so I’m stuck. Basically I need to be sure that if the player has the same score as the winner it activates sudden death mode.

For equality you just use “is”.

The comparison phrases are “is less than”, “is at most”, “is”, “is at least”, and “is greater than” (optionally with “not” added in to negate). As Triplanetary pointed out my earlier example with “is higher than” is incorrect.