beetlenaut wrote:You'll just have to do some extra checking. If it numerically_equals = 0, but doesn't also equals = "0", then you know they entered some non-numbers. Otherwise, they entered something valid.

Thanks beetlenaut, your solution seems more simple, and it looks like it would work. It's the first time in a long time I actually had to check whether a variable is a string or a number.. so rare it happens in WML.

For those who are wondering about this one I will try to write the way it works, but example is not tested and may fail to work due to mistakes or mistypes:
So as per my example.. you have a string that you need to check whether it is a number/integer/float or a letter/sentence/string

hi, i would still like to know, if anyone has ideas, how to make sounds heard only to specific players..
for example player shops something and runs out of gold and there is "out of gold" sound or something similar.. how do you make it work only for player 5 lets say.. ? do you use sound source and then just remove it straight away or what?
Thanks..

Hi, anyone knows exactly how the swarm number of attacks is calculated? (formula)
knowing the minimal number of attacks, maximum number of attacks and health (I would also need to know if health percentage is floored or ceiled or other, so ideally I would need to know the formula exactly or which folder of core I could possibly look for it to try to find it?)
I can guess the formula but I would like to be 100% correct and match the original formula, where hardest part is the health percentage floored or ceiled or none, and then if the number of attacks is floored or ceiled... otherwise I would need to do 100ds of tests to see what is happening.. and spend lot of time.
Thanks!

6.85 is not rounded.. if I ceil it will be 7.. is i floor it will be 6.. if i round closest it is 7...
How do I convert this formula into lua? How c++ rounds this? I know for sure that it will be either 6 or 7 attacks... it will not be 6.85 (but how did we achieve that? what would happen if result wass 6.45?) Is c++ always rounding to closest.. Ravana was it complete formula?
Sorry for so many questions.. it just doesn't work the way I see it at the moment...?

But I met a problem...
When I tested unit HP and was dropping it by 1 with each test, everything worked perfectly same as original swarm, apart from when unit hp became below 0... The original swarm always stayed at minimal number of strikes 3, while my formula was reducing strikes by 1.
And here is example.. Unit hp is -42

So it would be round(-4.35) so -4 ideally...
While in reality, real swarm is showing 3
And my stupid round formula is showing -5 (it's not meant to be working with negative values, but where it gets 5 instead of 4..? I have no idea..))
conclusion:
Original formula is incomplete or wrongly decoded.. or swarm just stops being calculated when unit's health drops below 1 hp..
My lua formula is working correctly for positive values of HP.. but goes nuts with negative values.