30.01.2010, 11:02
Why would you create a new function for each variable?
You only need one function and you simply pass in each variable you want to change.
Let`s say you got var1, var2 and var3 you want to increase by one.
You use the function in the code above and call it for each variable like this:
SetTimerEx("VariableIncrease", 1000, false, "d", var1);
SetTimerEx("VariableIncrease", 1000, false, "d", var2);
SetTimerEx("VariableIncrease", 1000, false, "d", var3);
And all of them will be increased by one after 1k ms.
You only need one function and you simply pass in each variable you want to change.
Let`s say you got var1, var2 and var3 you want to increase by one.
You use the function in the code above and call it for each variable like this:
SetTimerEx("VariableIncrease", 1000, false, "d", var1);
SetTimerEx("VariableIncrease", 1000, false, "d", var2);
SetTimerEx("VariableIncrease", 1000, false, "d", var3);
And all of them will be increased by one after 1k ms.

