Adding a temporary number variable to a statistic variable

I’m having trouble with getting a temporary input_number to a stat in my game.

The error I’m getting is: “catch is not a number”

My code looks like this:


*set catch_6 (((catch_1)+catch_2)+catch_3)
*if (catch_6<15)
 That's not enough for my research! go back out and get me some more!
 *goto start
*else
 Good job and thank you for your hardwork!
 *set catch  +catch_6
 *set sparkledust + (catch_6 *100)
 *goto mission

Example
*commend
Indent

Did you set up “catch” to hold numbers in startup.txt?
For example:
*create catch 0

If you do it this way…
*create catch “0”
Then it won’t work, because if it’s in parentheses, the variable holds a string, not a number.

Oh i did have it between quotation marks that fixed it thank you!

edit: Aahah well it fixed that bug but now if I have catch set to (for example) 10, it wont let me add the catch_6 to it, it will just set catch to whatever value catch_6 is.

You can try doing something like…
*set catch (catch + catch_6)

omg im sorry it was actually the previous mission that wasn’t adding correctly but with your help i was able to fix it thank you!

1 Like