Skip to content
Discussion options

You must be logged in to vote

I think the operator might have been the issue. (Meaning = <, not you, ha-ha.)

Change your if (player.example = < player.example2) to if (player.example <= player.example2), and I bet it works.

Tested with this:

player.example = 19
player.example2 = 42
if (player.example <= player.example2) {
  msg ("EXAMPLE IS LESS THAN OR EQUAL TO EXAMPLE2")
}
else {
  msg ("LESS THAN")
}

While I'm at it I'd also like some tips for how to tell if an attribute is between the values of two other attributes.

Something like:

if (player.att1 < player.att2 and player.att2 < player.att3) {
  //player.att2 is between player.att1 and player.att3
}

Tested with:

player.att1 = 1
player.att2 = 2
player.att3 = 3
if (

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Retrodragon20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants