Math & Logic
P_isnumber
Syntax
@isnumber({text})
Use Case:
Checks if a string represents a valid number. Returns 1 if true, 0 if false.
Arguments:
- {text}: The string to test.
Examples:
- /if {@isnumber($data)} {/echo Valid} {/echo Invalid}
See Also:
@val, @math
P_math
Syntax
@math({expression})
Use Case:
Evaluates a mathematical expression and returns the result.
Arguments:
- {expression}: The math formula (e.g. 2 + 2 * 5).
Examples:
- /var {gold} {@math($gold + 500)}
See Also:
@abs, @val, @isnumber
P_val
Syntax
@val({text})
Use Case:
Converts a string of text into a numeric value.
Arguments:
- {text}: The numeric string.
Examples:
- /if {@val($input) > 10} {look}
See Also:
@isnumber, @math