I've searched the forums and the documentation wiki, but cannot find anywhere a function which checks if a value is an integer or not. As always, explaining my situation is the best way to get my problem resolved:
I have a single text input field, which I want the player to input a number, but the code requires it to be an integer. Ideally I would've preferred a Case..Of function to do this, but it appears this doesn't exist either (correct me if I'm wrong).
Pseudo code of my macro is:
Code: Select all
If input = -5 then
perform ruleset -5 else;
...
If input = 0 then
perform ruleset 0 else;
If input = 1 then
perform ruleset 1 else;
If input = 2 then
perform ruleset 2 else;
...
1. Is the easiest/only way to put a the start a plethora of "If input >0 && <1 then abort(0)" for the distance between each integer?
2. Is there an isInteger function
3. Is there a Case..of function?
I have a secret project in the works, though whether I decide to dedicate time to it is another matter. It all hinges on the scope of the macro language.
Thankyou in advance.