- Joined
- Feb 11, 2011
- Messages
- 1,860
Hi guys,
I am making a bounty system for someone and I have encountered a strange issue. When I calculate bounty, it gives 299 instead of 300. Here is the code:
And where it is called:
Where
Any ideas? Thanks!
I am making a bounty system for someone and I have encountered a strange issue. When I calculate bounty, it gives 299 instead of 300. Here is the code:
JASS:
private function CalculateBounty takes integer level returns real
return 250.0 * 1.2 * I2R(level)
endfunction
JASS:
local integer bounty = GetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD) + R2I(CalculateBounty(GetHeroLevel(u)))
u
is the dying hero and p
is the owner of the killing unit.Any ideas? Thanks!