Limiting Number Variables


#1

Is there a specific code or even possible to put a limit to specific variables. Let’s just say on a text variable I don’t want it to go over 30 or on a percent variable I don’t want it to go over 50, is this possible to do?


#2

There may be some nifty code but I do the following.

*label where_you_are
*set var_namer +25
*gosub var_check
*goto some_where

*label var_check
*if (var_name>30)
 *set var_name 30
 *return
*if ((var_name<=30) and (var_name>=0))
 *return
*if (var_name<0)
 *set var_name 0
 *return

#3

And so I’m guessing you do that at all the areas where you know that it’s possible where the variable would go over 30?


#4

You could have it goto a page for just setup for checks

*label where_you_are
*set var_namer +25
*gosub_scene checks var_check
*goto some_where

It go to the check page then the label then once done return.