MZScript 0.9 beta 3 jam math? Thread last updated on 2003-11-09 05:24:32

Posted by member 70043 on 2003-11-08 01:55:07

I need help making my mzscript add or subtract 1 to a var in my var.rc file.

My idea is to make !varset add 1 to the existing number or subtract 1 from the existing number.

EG: Var File: string 4

script file: !varset string (already at 4) -1 (make it three instead of 4)

so that my script will read an exact # from 0 to 9 on that string and no what to do for each different number...

I have tried simply !varset string "+1" which simply changes the var setting to read var +1 and so on... so it need it to actually add or subtract a number and rewrite it in the var file as the new number....

is there a way to do this??????

If so, please help so I can get this theme out.

Thanks

Posted by member 32550 on 2003-11-08 07:25:15 link

Hi,
Simply Use The Given Bangs In The DOCS,
!varadd yourvariablename number

number can also be -1 or -$adder$, ... what you can think of.
You can also multiply with
!varmul yourvariablename number

You should look in the docs btw.

Hope this helps

Andymon

Posted by member 70043 on 2003-11-09 05:24:32 link

ohhhhh... lol.. im not having a good few days i guess.. i didnt even see that in the docs.. lol