equals

From RPTools Wiki
Revision as of 23:40, 9 February 2023 by Conversion script (talk | contribs) (Conversion script moved page Equals to equals: Converting page titles to lowercase)
Jump to navigation Jump to search

equals() Function

This functions checks for equality between all of the passed in values. You can use it for string (case-insensitive) or numeric comparisons but not both at the same time. Passing in a mix of strings and numbers will always return false.

Usage

equals(n1, n2, ...)
equals(s1, s2, ...)

Parameters

  • n1+ - Number
  • s1+ - String

Example

[r: equals(1, 1)]
[r: equals(1, 1, 0)]
[h: species = "duck"]
[r: equals(species, "Duck")]
[r: equals(species, "Chicken")]

Returns:

1
0
1
0

See Also