ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed May 27, 2020 9:54 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon May 05, 2014 9:38 pm 
Offline
Cornac

Joined: Sat Jan 14, 2012 12:53 am
Posts: 32
v can be a table here. This silences the error (tonumber of nil is nil and tonumber of not a number is nil):

Code:
diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index a47492e..0d6d26a 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -1715,7 +1715,7 @@ function _M:tooltip(x, y, seen_by)
 
        local retal = 0
        for k, v in pairs(self.on_melee_hit) do
-               if v then retal = retal + v end
+               if tonumber(v) then retal = retal + v end
        end
 
        if retal > 0 then ts:add("Melee Retaliation: ", {"color", "RED"}, tostring(math.floor(retal)), {"color", "WHITE"}, true ) end


Top
 Profile  
 
PostPosted: Mon May 05, 2014 10:00 pm 
Offline
Master of Eyal

Joined: Wed Jul 24, 2002 9:26 pm
Posts: 10478
Location: Angolwen
thanks :)

_________________
[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 ;)


Top
 Profile  
 
PostPosted: Tue May 06, 2014 9:35 pm 
Offline
Cornac

Joined: Sat Jan 14, 2012 12:53 am
Posts: 32
I can confirm that this is fixed for me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group