BBot - The best bot of the world
Var add up - Printable Version

+- BBot - The best bot of the world (https://forums.bmega.net)
+-- Forum: Support (https://forums.bmega.net/forum-6.html)
+--- Forum: Support & Help (https://forums.bmega.net/forum-8.html)
+--- Thread: Var add up (/thread-1337.html)



Var add up - | socio | - 08-10-2011

How can i add up 2 var and get that value.

Var 1 + Var 2 = Value

Ex:
The var 1 return 2
The var 2 return 3

2 + 3 =5

How can i do that?

Other...
How can i do that.
Get the var 1 value and multiply by the next value?


Var add up - Noen - 08-10-2011

wiki Wrote:VarAdd(Name, Value) adds to the variable the value (x + value).

Therefore:

Code:
VarAdd(Var1,!Var2!)
or
Code:
!Var1!+!Var2!=!Var3!


Everytime you want to call a variable from outside a variable command (i.e VarAdd, VarSub, VarMod, etc), you need to use "!" right after and before the variable: !var!

To multiple a variable by a constant use:

wiki Wrote:VarMult(Name, Value) multiplies the variable by the value (x * value).



Re: Var add up - Miksu1337 - 08-11-2011

Can someone even teach me what is this "var" thing on macro. ye everybody tells me to read wiki but the wiki isn't good at all.. it wont teach me how to use it. Maybe someone can help me? Big Grin


Re: Var add up - MegaNo0body - 08-11-2011

Miksu1337 Wrote:Can someone even teach me what is this "var" thing on macro. ye everybody tells me to read wiki but the wiki isn't good at all.. it wont teach me how to use it. Maybe someone can help me? Big Grin

Var are personal variables, you can use them to store custom values.

You can create a variable on this two ways:

VarSet(MyHP) Self.Health
or
MyHP:= Self.Health

This two ways create a custom variable called MyHP containing the value of Self.Health. You can access that value using this way: !MyHP!

Sample:

MyHP := Self.Health HUD.Display(My Current HP is !MyHP!)


Re: Var add up - Miksu1337 - 08-11-2011

btw sorry i know this is wrong thread. But the last forum was better. i mean this doesn't look good. also maybe u could use repulation system. so everyone can add rep++ to some ppl they like. if u know what i mean


Re: Var add up - MegaNo0body - 08-11-2011

Miksu1337 Wrote:btw sorry i know this is wrong thread. But the last forum was better. i mean this doesn't look good. also maybe u could use repulation system. so everyone can add rep++ to some ppl they like. if u know what i mean

The Rep++ system is the thanks system I have ever used..

About the THEME, it is strange, but I like it... Ofc, I'll improve it.