ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed May 27, 2020 10:07 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun May 04, 2014 1:12 am 
Offline
Cornac

Joined: Sat Jan 14, 2012 12:53 am
Posts: 32
I reported this in-game once, the only time the error didn't loop:
an < bn blows up when these are null. Check for null before doing a comparison.
Deleting this condition restores previous functionality, which works okay.

Code:
diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player
index 83a68b5..5c940b8 100644
--- a/game/modules/tome/class/Player.lua
+++ b/game/modules/tome/class/Player.lua
@@ -828,13 +828,13 @@ function _M:automaticTalents()
        end
        table.sort(uses, function(a, b)
                local an, nb = util.getval(a.no_energy, self, a), util.getval(b.
-               if an < bn then return true
-               elseif an > bn then return false
-               else
+--             if an < bn then return true
+--             elseif an > bn then return false
+--             else
                        if a.cd > b.cd then return true
                        else return false
                        end
-               end
+--             end
        end)
        table.print(uses)
        for _, use in ipairs(uses) do


Top
 Profile  
 
PostPosted: Sun May 04, 2014 12:13 pm 
Offline
Uruivellas

Joined: Wed Apr 30, 2008 5:55 pm
Posts: 708
The real error is the:
local an, nb
should be:
local an, bn

I showed this to Shibari like a week ago, it must've gotten lost in the pipeline somewhere.

_________________
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated. :)


Top
 Profile  
 
PostPosted: Sun May 04, 2014 11:33 pm 
Offline
Cornac

Joined: Sat Jan 14, 2012 12:53 am
Posts: 32
You are right! This works 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: No registered users and 3 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