Difference between revisions of "Min"

From Hercules Wiki
Jump to: navigation, search
(Created page with "== Syntax == *min(<number>{,<number>...<number>}) *max(<number>{,<number>...<number>}) == Description == Returns the smallest (or biggest) from the set of given numbe...")
 
(nevermind me [4] (testing stuff))
 
Line 11: Line 11:
 
.@level = min(BaseLevel, 70); // .@level will be the character's base level, capped to 70
 
.@level = min(BaseLevel, 70); // .@level will be the character's base level, capped to 70
 
</pre>
 
</pre>
 +
 
[[Category:Script Command]]
 
[[Category:Script Command]]

Latest revision as of 14:04, 17 January 2015

Syntax

  • min(<number>{,<number>...<number>})
  • max(<number>{,<number>...<number>})

Description

Returns the smallest (or biggest) from the set of given numbers.

Example

	.@minimum = min(1, -6, -2, 8, 2); // .@minimum will be equal to -6
	.@maximum = max(0, 5, 10, 4); // .@maximum will be equal to 10
	.@level = min(BaseLevel, 70); // .@level will be the character's base level, capped to 70