This error occurs pretty frequently from random mobs trying to do stuff anywhere on the level. Haven't managed to isolate exactly what talent or whatnot is causing it, if this isn't enough info can investigate more closely next time it crops up.
[URL=http://s1302.photobucket.com/user/ ... .png[/img][/url]
[git] Arithmetic LUA errors
Moderator: Moderator
Re: [git] Arithmetic LUA errors
The line causing annoyance is:
The expression "ab.stamina * (100 + self:combatFatigue)/100)" should be replaced with "util.getval(ab.stamina, self, ab) * (100 + self:combatFatigue()) / 100", like in former comparison.
It triggers only on variable-stamina talents when Adrenaline Surge is active. So, rarely.
Code: Select all
if ab.stamina and self:getStamina() < util.getval(ab.stamina, self, ab) * (100 + self:combatFatigue()) / 100 and (not self:hasEffect(self.EFF_ADRENALINE_SURGE) or self.life < ab.stamina * (100 + self:combatFatigue()) / 100) then
It triggers only on variable-stamina talents when Adrenaline Surge is active. So, rarely.
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: [git] Arithmetic LUA errors
Good Catch!
Here is the patch for the latest Git version (e6f53c639a11490b6525635fafa890e6c67088f6)
Here is the patch for the latest Git version (e6f53c639a11490b6525635fafa890e6c67088f6)
Code: Select all
game/modules/tome/class/Actor.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index e6f5082..ca59174 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -3613,7 +3613,7 @@ function _M:preUseTalent(ab, silent, fake)
if not silent then game.logPlayer(self, "You do not have enough mana to cast %s.", ab.name) end
return false
end
- if ab.stamina and self:getStamina() < util.getval(ab.stamina, self, ab) * (100 + self:combatFatigue()) / 100 and (not self:hasEffect(self.EFF_ADRENALINE_SURGE) or self.life < ab.stamina * (100 + self:combatFatigue()) / 100) then
+ if ab.stamina and self:getStamina() < util.getval(ab.stamina, self, ab) * (100 + self:combatFatigue()) / 100 and (not self:hasEffect(self.EFF_ADRENALINE_SURGE) or self.life < util.getval(ab.stamina, self, ab) * (100 + self:combatFatigue()) / 100) then
if not silent then game.logPlayer(self, "You do not have enough stamina to use %s.", ab.name) end
return false
end
Re: [git] Arithmetic LUA errors
It was already fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: [git] Arithmetic LUA errors
Hmm, I guess I should be better about regularly updating my version to keep track of these things. A general question, out of curiosity: Random non-destructive LUA errors that crop up like this, I tend to write a little description and send a report the first time they come along. Are these usually just quietly dealt with, and it'd be best not to spam up the bug forum with them?
For instance, there's another one (which I guess may or may not have been stealthily dealt with!) where you get an LUA error when trying to use shoot down on a Tornado projectile.
For instance, there's another one (which I guess may or may not have been stealthily dealt with!) where you get an LUA error when trying to use shoot down on a Tornado projectile.
Re: [git] Arithmetic LUA errors
I get them but you can post them too for more clarity
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: [git] Arithmetic LUA errors
I was using the latest Git files so I have no idea how the correction (which predates the switch to git) failed to get into my repo.
At any rate, the rule of thumb I use when deciding to post a bug on the forums is if the post would be useful documentation for players. So generally, I'll post in the forums about a bug on the current official release.
At any rate, the rule of thumb I use when deciding to post a bug on the forums is if the post would be useful documentation for players. So generally, I'll post in the forums about a bug on the current official release.