• 0

    posted a message on Lua error when loading Autobar + RhadaTip
    Quote from Zidomo
    Hook wrong and you get hooked. An option is to look at how other mods add information to tooltips without breaking/conflicting with things.

    One example: Tekkub's Engravings, which also places data in tooltips. Tekkub doesn't "hook" anything at all; instead uses just OnTooltipSetItem. Mendeleev also uses that, but hooks into events with self:SecureHookScript. TradeskillInfo hooks like a hooking hooker (rugby! ;)), but also uses secure hooks and doesn't break things. And so on.

    You are using ItemRefTooltip:HookScript and so on for the Blizzard tooltips. Change them to secure hooks?


    According to the book that I'm reading, WoWProgramming, you can:


    1. Hook a Function securely (page 270) using hooksecurefunc
    2. Hook Scripts securely (page 271) using widget:HookScript
    so I thought that I was hooking securely. I guess that I've not understood what the book is saying though if you say that I've hooked the script to the widget in an unsafe way.

    EDIT: from wowwiki


    Insecure hooking: If you want to alter behavior significantly, it may be easier to call widget:GetScript to get the original handler, and widget:SetScript to set a hooked verson.

    Secure hooking widget:HookScript allows you to set up a secure post-hook that will be called after the original handler, with the same arguments as the original handler.
    engravings does:

    local function OnTooltipSetItem(frame, ...)
        if not db then db, dbpc = initdb() end
        if not sortedtitles then
            sortedtitles = {}
            for title,data in pairs(sources) do table.insert(sortedtitles, title) end
            table.sort(sortedtitles, function(a,b) return string.lower(a) < string.lower(b) end)
        end
     
        local name, link = frame:GetItem()
        if link then
            local id = tonumber(link:match("item:(%d+):"))
            for i,title in pairs(sortedtitles) do
                local data = sources[title]
                if not (db[title] or dbpc[title]) and data[id] then frame:AddDoubleLine(type(title) == "string" and title or "", data[id], R, G, B, R, G, B) end
            end
        end
        if origs[frame] then return origs[frame](frame, ...) end
    end
     
     
    for _,frame in pairs{GameTooltip, ItemRefTooltip, ShoppingTooltip1, ShoppingTooltip2} do
        origs[frame] = frame:GetScript("OnTooltipSetItem")
        frame:SetScript("OnTooltipSetItem", OnTooltipSetItem)
    end
    so unless I'm completely lost, I'd say that the way I did it is the safe way, and engraving's is the unsafe one.
    Posted in: AddOn HELP!
  • 0

    posted a message on Lua error when loading Autobar + RhadaTip
    I've put some prints, I'm not sure why but they stop at White Tickbird Hatchling

    Another thing that I've noticed is that I have no errors on an alt, so it would appear that the compatibility issue isnt actually caused by the two mods, but by something else + the 2 mods, or I'd have had the issue on my alt too.
    Posted in: AddOn HELP!
  • 0

    posted a message on Lua error when loading Autobar + RhadaTip
    Quote from Arrowmaster
    Debugstacks from blizzards error frame are useless because they are wrong.


    Which one do you want? Bugsack?

    [2009/09/13 15:59:10-5062-x2]: AutoBar-v3.02.00.24 beta.778\AutoBarSearch.lua:539: attempt to index local 'itemData' (a string value)
      ---
    
    [2009/09/13 15:59:11-5062-x1]: AutoBar-v3.02.00.24 beta.778\AutoBarSearch.lua:539: attempt to index local 'itemData' (a string value)
    <in C code>: ?
    AceEvent-2.0-91091 (AtlasLootFu):264: in function `TriggerEvent'
    AceEvent-2.0-91091 (AtlasLootFu):910: in function <...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:903>
      ---
    
    [2009/09/13 15:59:13-5062-x1]: AutoBar-v3.02.00.24 beta.778\AutoBarSearch.lua:567: attempt to index local 'itemData' (a string value)
      ---
    Posted in: AddOn HELP!
  • 0

    posted a message on Lua error when loading Autobar + RhadaTip
    Quote from Seerah
    Your code (at least the code on wowi) references RhadaTip_OnTooltipSetItem when hooking. But I do not see that function anywhere in your code.

    And yes - full stack trace/full error please.


    About the "RhadaTip_OnTooltipSetItem" function, there is one in each of the localized files (ie. RhadaTipLocale.enUS.lua).

    As far as the stack goes, you are right of course, I just was at work and unable to provide you one. Here it is :p

    Message: ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:430: bad argument #6 to 'format' (string expected, got nil)
    Time: 09/11/09 20:48:48
    Count: 1
    Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    [C]: ?
    [C]: in function `format'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:430: in function `ScriptErrorsFrame_Update'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:412: in function `ScriptErrorsFrame_OnError'
    [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    [C]: ?
    [C]: in function `format'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:430: in function `ScriptErrorsFrame_Update'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:412: in function `ScriptErrorsFrame_OnError'
    [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    [C]: ?
    [C]: in function `format'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:430: in function `ScriptErrorsFrame_Update'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:412: in function `ScriptErrorsFrame_OnError'
    [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    [C]: ?
    [C]: in function `format'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:430: in function `ScriptErrorsFrame_Update'
    ...e\AddOns\Blizzard_DebugTools\Blizzard_DebugTools.lua:412: in function `ScriptErrorsFrame_OnError'
    [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    ...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:265: in function `TriggerEvent'
    ...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:910: in function <...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:903>
    
    Locals: (*temporary) = "Message: %s
    Time: %s
    Count: %s
    Stack: %s
    Locals: %s"
    (*temporary) = "Interface\AddOns\AutoBar\AutoBarSearch.lua:539: attempt to index local 'itemData' (a string value)"
    (*temporary) = "09/11/09 20:48:47"
    (*temporary) = "1"
    (*temporary) = "[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    ...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:369: in function <...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:345>
    "
    (*temporary) = nil
    (*temporary) = "Message: Interface\AddOns\AutoBar\AutoBarSearch.lua:539: attempt to index local 'itemData' (a string value)
    Time: 09/11/09 20:48:47
    Count: 1
    Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    ...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:369: in function <...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:345>
    
    Lo"
    (*temporary) = "string expected, got nil"


    and

    Message: Interface\AddOns\AutoBar\AutoBarSearch.lua:539: attempt to index local 'itemData' (a string value)
    Time: 09/11/09 20:52:19
    Count: 1
    Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    ...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:261: in function `TriggerEvent'
    ...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:925: in function <...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:923>
    [C]: ?
    ...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:368: in function <...ddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:345>
    
    Locals: self = <table> {
     UnregisterAllEvents = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:528
     postInit = true
     CancelScheduledEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:464
     argCheck = <function> defined @Interface\AddOns\FuBar\libs\AceLibrary\AceLibrary.lua:129
     FAKE_NIL = <userdata>
     currentEventUID = 1349
     CancelAllScheduledEvents = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:574
     ALL_EVENTS = <userdata>
     registry = <table> {
     }
     TriggerEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:233
     currentEvent = "AceEvent_FullyInitialized"
     IsEventScheduled = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:482
     IsBucketEventRegistered = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:711
     PLAYER_REGEN_DISABLED = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:771
     RATE = <userdata>
     ScheduleLeaveCombatAction = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:802
     CancelAllCombatSchedules = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:753
     UnregisterAllBucketEvents = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:740
     RegisterBucketEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:607
     playerLogin = true
     UID_NUM = 1350
     super = <table> {
     }
     IsEventRegistered = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:590
     PLAYER_REGEN_ENABLED = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:777
     ScheduleEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:440
     OnEmbedDisable = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:861
     pcall = <function> defined @Interface\AddOns\FuBar\libs\AceLibrary\AceLibrary.lua:167
     throttleRegistry = <table> {
     }
     GetLibraryVersion = <function> defined @Interface\AddOns\FuBar\libs\AceLibrary\AceLibrary.lua:585
     export = <table> {
     }
     onceRegistry = <table> {
     }
     ScheduleRepeatingEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:452
     RegisterEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:98
     embedList = <table> {
     }
     combatSchedules = <table> {
     }
     delayRegistry = <table> {
     }
     frame = AceEvent20Frame {
     }
     uid = "1F74AD80"
     buckets = <table> {
     }
     IsFullyInitialized = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:871
     error = <function> defined @Interface\AddOns\FuBar\libs\AceLibrary\AceLibrary.lua:75
     UnregisterBucketEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:716
     UnregisterEvent = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:493
     RegisterAllEvents = <function> defined @Interface\AddOns\AtlasLootFu\Libs\AceEvent-2.0\AceEvent-2.0.lua:200
    }
    Posted in: AddOn HELP!
  • 0

    posted a message on Lua error when loading Autobar + RhadaTip
    Hello guys once again. You have proven already very very helpful to me and to the development of RhadaTip, I've spent a lot of time trying to fix this myself, but it seems that I can't, so I'll have to ask for a bit of your time once more...

    I have the following problem, something that I've been trying to resolve for quite a while, but it's become somewhat of a frustration as it is undermining the adoption of my addon, and sadly it seems that Autobar has been discontinued (and the author hasn't replied to me in the last months).

    To put it in short, Autobar stops working when the user also loads my addon. What my addon does is tooltip:HookScript("OnTooltipSetItem",...) to add extra informations to item's tooltips (tooltip:AddLine("...")).

    The lua error when logging in is in Autobar's code, and is as follows:

    [COLOR=#ff0000][2009/06/23 11:21:52-144-x2]: AutoBar-v3.01.02.23 beta.778\AutoBarSearch.lua:537: attempt to index local 'itemData' (a string value) [/COLOR]
    [COLOR=#ff0000][2009/06/23 11:21:56-144-x1]: AutoBar-v3.01.02.23 beta.778\AutoBarSearch.lua:565: attempt to index local 'itemData' (a string value) [/COLOR]


    Here is the piece of code that I belive is of interest:

    [COLOR=#000000][COLOR=#ff0000]-- Found is a list of the different items found in bags & inventory[/COLOR]
    [COLOR=#000000]-- Syncs to Stuff and Current[/COLOR]
    [COLOR=#000000]-- itemId = { [bag, slot, spell], ... }[/COLOR]
    [COLOR=#000000]local Found = AceOO.Class(Recycle)[/COLOR]
     
    [COLOR=#000000]function Found.prototype:init()[/COLOR]
    [COLOR=#000000]   Found.super.prototype.init(self)[/COLOR]
    [COLOR=#000000]   self.dataList = {}[/COLOR]
    [COLOR=#000000]end[/COLOR]
     
    [COLOR=#000000]-- Add itemId to bag, slot[/COLOR]
    [COLOR=#000000]function Found.prototype:Add(itemId, bag, slot, spell)[/COLOR]
    [COLOR=#000000]   local itemData = self.dataList[itemId][/COLOR]
    [COLOR=#000000]   if (not itemData) then[/COLOR]
    [COLOR=#000000]       itemData = self:Create()[/COLOR]
    [COLOR=#000000]       self.dataList[itemId] = itemData[/COLOR]
    [COLOR=#000000]       itemData[1] = bag[/COLOR]
    [COLOR=#000000]       itemData[2] = slot[/COLOR]
    [COLOR=#000000]       itemData[3] = spell[/COLOR]
    [/COLOR]


    I have tried to put some prints around, but without any success.

    Can anyone throw me any tip?

    Thanks,
    Rhad
    Posted in: AddOn HELP!
  • 0

    posted a message on RhadaTip (accurate xPS values on tooltips)
    First post slightly updated, and I've uploaded version 2.1.3c to fix a couple issues with auto loading of a pre saved template on login and the support to ct_RaidTracker
    Posted in: General AddOns
  • 0

    posted a message on RhadaTip (accurate xPS values on tooltips)
    Added:


    • Support to WoWEquip in order to go N items ahead of your current setup, up to the bis
    • An automatic gem optimizer
    • Support to tier bonuses
    Therefore I'll update the first post in order to reflect the current state of the addon and what is has to offer.
    Posted in: General AddOns
  • 0

    posted a message on RhadaTip (accurate xPS values on tooltips)
    New version is up:

    Why should I update from 2.1.1 to 2.1.2?
    - Pre-Saved scaling values.
    - Working deDE, frFR and esES locales.
    - Twin Val'kyr 25 men normal mode trinkets.
    - Fixed a bug caused by having a Alchemist Stone trinket equipped.
    - Fixed a bug caused by some trinkets when logging in with the secondary spec as the active one.



    If you have a pre-set scaling value template that you feel is lacking, let me know.
    Posted in: General AddOns
  • 0

    posted a message on Problem with a variable set on ADDON_LOADED and not seen in PLAYER_ENTERING_WORLD
    Quote from Xinhuan
    WoW is currently using a single threaded model to run their game, including the Lua engine. This means that there is no "pre-empt" of catching events. When ADDON_LOADED fires, and you do a computation in your code that takes 65 seconds to complete, WoW will only run your function and only that function for the next 65 seconds.

    When the 65 seconds ends, it will start firing all the events that have queued up in its backlog. Events cannot "interrupt" each other as you are thinking in a multi-threaded environment. That is to say, PLAYER_ENTERING_WORLD cannot fire until all addons have completed loading one after the other.

    If your Lua code contains an infinite loop, wow would basically hang and you can only close it from Windows Task Manager. If your code takes too long to run, say 90 seconds, when it completes, the server may have disconnected you as well, leading to a backlog of events to complete, followed by a sequence of disconnection events (usually PLAYER_LOGOUT and PLAYER_LEAVING_WORLD) before you are returned to the character selection screen.

    http://www.wowwiki.com/Events_that_fire_during_the_Loading_Process

    This wiki page is obviously very basic and doesn't list many other events (bag events, inventory events, talent events) that also fire during the load process. VARIABLES_LOADED used to be in that list because its ordering was fixed in the past, but this is no longer true, it can now fire at any time between the last ADDON_LOADED and beyond PLAYER_ENTERING_WORLD.


    I noticed that wiki, that is why I was so sure that ADDON_LOADED was fired before PLAYER_ENTERING_WORLD.

    What confused me was this:

    load time can influence things especially if you have racing conditions as such try to avoid them and make sure that things can only load in one sequence


    Anyway thanks everyone, I learnt a lot and I solved the issue (ACTIVE_TALENT_GROUP_CHANGED called on login when you are on spec2), so I guess that I could consider this issue solved.
    Posted in: AddOn HELP!
  • 0

    posted a message on Problem with a variable set on ADDON_LOADED and not seen in PLAYER_ENTERING_WORLD
    Quote from Harmegido
    ACTIVE_TALENT_GROUP_CHANGED is absolutely called after logging in. That could be causing you trouble there. As you log in, the variable for currentSpec is "1", but if you are actually in your 2nd spec it will change the variable to "2" AFTER the PLAYER_LOGIN event. Which is why you may be having problems reproducing it.

    FYI PLAYER_ENTERING_WORLD is called anytime you change zones, so if you only want it to be run at login then use PLAYER_LOGIN.

    Best of luck! Debugging event orders is a pita!


    This is it man. I tested it just now, ACTIVE_TALENT_GROUP_CHANGED is not called if you are on spec 1 when you log on, but it is if you are on spec 2 when you log on. That must be why I wasn't able to reproduce the error, thanks so much!
    Posted in: AddOn HELP!
  • 0

    posted a message on Problem with a variable set on ADDON_LOADED and not seen in PLAYER_ENTERING_WORLD
    Quote from yssaril
    load time can influence things especially if you have racing conditions as such try to avoid them and make sure that things can only load in one sequence


    Well I was kinda forcing that sequence with the flow of events. If I understand correctly, once ADDON_LOADED has been fired (because all saved variables have been loaded) I intercept it. At this point, if a long computation starts, the loading sequence keeps going, and PLAYER_ENTERING_WORLD gets called even though I'm not finished with my computation in the OnEvent(ADDON_LOADED). Correct? What is the best way to avoid these issues?
    Posted in: AddOn HELP!
  • 0

    posted a message on Problem with a variable set on ADDON_LOADED and not seen in PLAYER_ENTERING_WORLD
    Thanks to both. Sadly, and strangely enough, I was only able to reproduce the effect on this other person's pc, but not on mine. On mine, I delete the SOME_CASTING_TIME from the saved variables, load, and as expected I properly get the message "No spell casting time has been set yet, setting it to 9999" and no lua error. On this other person, doing the same thing produces the lua error that I've posted. I've mailed this person to check if he also sees the "No spell casting time has been set yet, setting it to 9999" or not, I hopefully will get an answer tomorrow. Do you think that the speed at which the addon is loaded, say influenced by hardware etc, could cause the different behaviour?

    In the meantime thanks again and also thanks for pointing out the xml mistake (Don't use Script file="Whatever" in your XML if you have specified the order in toc)
    Posted in: AddOn HELP!
  • 0

    posted a message on Problem with a variable set on ADDON_LOADED and not seen in PLAYER_ENTERING_WORLD
    Quote from Xinhuan
    1. Did you register ADDON_LOADED to a frame that calls RhadaTip_OnEvent()?
    2. The following 2 lines of code are identical:

    local addon = select(1, ...)
    local addon = ...

    if ... == "RhadaTip" then
    if addon == "RhadaTip" then

    3. Are you sure some other function hasn't been setting SOME_CASTING_TIME to nil?



    First of all thanks for the help. Abount the first:

    function RhadaTip_OnLoad(self)
        -- load the support for GameTooltip and ItemRefTooltip
        RhadaTip_MAINLOAD();
        -- load the support for EquipCompare, if available
        RhadaTip_EC();
        -- load the support for AtlasLoot, if available
        RhadaTip_Al();
        -- register this mod on the following four events
        self:RegisterEvent("ADDON_LOADED");
        self:RegisterEvent("PLAYER_ENTERING_WORLD");
        self:RegisterEvent("PLAYER_EQUIPMENT_CHANGED");
        self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
        self:RegisterEvent("SOCKET_INFO_UPDATE");
        -- set the slash commands to call this mod with
        SLASH_RhadaTip1 = "/RhadaTip";
        SLASH_RhadaTip2 = RhadaTip_IsRaidTrackerLoaded();
               SlashCmdList["RhadaTip"] = function(msg)
            RhadaTip_SlashCommandHandler(msg);
        end
    end



    About the second I'm not really sure of what you mean, and about the third: these is a function that might set it to nil, but it is only called in 2 circumstances:

    1- after a user presses the validate button of a frame
    2- after the event ACTIVE_TALENT_GROUP_CHANGED

    This lua error happens when the user logs in, so I think that we can exclude case number 1. I admit that I've not checked it, but ACTIVE_TALENT_GROUP_CHANGED being called at log in seems a bit strange to me...
    Posted in: AddOn HELP!
  • 0

    posted a message on Problem with a variable set on ADDON_LOADED and not seen in PLAYER_ENTERING_WORLD
    Guys, I have the following issue.

    function RhadaTip_OnEvent(self, event, ...)    
        if (event == "PLAYER_ENTERING_WORLD" or event == "PLAYER_EQUIPMENT_CHANGED") then
            computeAllGear()
            RhadaTip_InitGainType()
        else
            local addon = select(1, ...);
               if(addon == "RhadaTip" ) then
                DEFAULT_CHAT_FRAME:AddMessage("RhadaTip " .. RhadaTipVersion .. ": addon loaded. Type "  .. SLASH_RhadaTip2 ..  " for the list of supported slash commands.", 1.0, 0.0, 0.95, 50, 5);
                if SOME_CASTING_TIME == nil then
                    DEFAULT_CHAT_FRAME:AddMessage("No spell casting time has been set yet, setting it to 9999", 1.0, 0.0, 0.0, 53, 5);
                    SOME_CASTING_TIME = 9999
                end
    This is the part of the code that i reckon you might need to understand the issue. Basically, once the addon has been loaded, if the saved variable SOME_CASTING_TIME is nil, it sets it to 9999. If the event is PLAYER_ENTERING_WORLD (which afaik is after ADDON_LOADED), it fires the function computeAllGear(), which also calls the function getItemSlotValue(), that for trinkets calls RhadaTip_Trinkets().

    I don't really understand how a user can get the following error:

    Message: Interface\AddOns\RhadaTip\RhadaTip.lua:1319: attempt to perform arithmetic on global 'SOME_CASTING_TIME' (a nil value)
    Time: 08/29/09 16:32:42
    Count: 1
    Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
    (tail call): ?
    [C]: ?
    Interface\AddOns\RhadaTip\RhadaTip.lua:1319: in function `RhadaTip_Trinkets'
    Interface\AddOns\RhadaTip\RhadaTipLocale.enUS.lua:98: in function `getItemSlotValue'
    Interface\AddOns\RhadaTip\RhadaTip.lua:2543: in function `computeAllGear'
    Interface\AddOns\RhadaTip\RhadaTip.lua:1889: in function `RhadaTip_OnEvent'
    [string "*:OnEvent"]:1: in function <[string "*:OnEvent"]:1>

    Since SOME_CASTING_TIME, if it even was nil, is now 9999 when the chain calls starting from RhadaTip_OnEvent ("PLAYER_ENTERING_WORLD") fire, how can it still be nil?

    Thanks everyone,
    Rhad
    Posted in: AddOn HELP!
  • 0

    posted a message on RhadaTip (accurate xPS values on tooltips)
    Quote from Elsia
    Would be nice if this either came with sensible defaults for all classes/core roles or did some talent scanning to derive hit capping for example.

    Now it's OK but pretty heavy on the overhead if you play a few alts too.



    Talent scanning looks a bit useless to me. All that to avoid setting one thing out of like 10 or more? Plus it's not just talents, but raid buffs as well that matter in setting the hit cap in my addon, so ultimately the user will still have to make the update by himself.

    Pre-set values is something that I've considered, but I fear that the avg user will settle for those, while the flagship of my addon is supposed to be the extreme accuracy of the numbers displayed.
    Even accepting the loss of accuracy due to pre set values, I fear that those will force an excessive number of updates, whilst the good thing of rhadatip is that it's immune to every patch/class change. Besides the support to new stats like mastery of course, rhadatip would already be Cataclysm-ready if you think about it.
    Posted in: General AddOns
  • To post a comment, please or register a new account.