1. #1

    In need of someone good with lua please

    Hi I'm looking for someone who is good with lua who can possibly fix something.
    The addon is called Spy and there was a fix posted in the comments for it up on curse to replace "GetNumPartyMembers" with GetNumSubgroupMembers" in the list.lua file.

    That worked to get it running again but there remains an error with Spy_MainWindow:hide()

    here is the log from my taintLog

    9/7 01:24:39.437 Execution tainted by Spy while reading WATCHFRAME_NUM_POPUPS - Interface\FrameXML\WatchFrame.lua:460 WatchFrame_Update()
    9/7 01:24:39.437 Interface\FrameXML\WatchFrame.lua:340
    9/7 01:24:39.437 SetMapToCurrentZone()
    9/7 01:24:39.437 Interface\FrameXML\WatchFrame.lua:336
    9/7 01:24:39.437 An action was blocked in combat because of taint from Spy - Spy_MainWindow:Hide()
    9/7 01:24:39.437 Interface\AddOns\Spy\Spy.lua:1312 ?()
    9/7 01:24:39.437 Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:147 method()
    9/7 01:24:39.437 safecall Dispatcher[2]:4
    9/7 01:24:39.437 xpcall()
    9/7 01:24:39.437 safecall Dispatcher[2]:13 ?()
    9/7 01:24:39.437 Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:92 Fire()
    9/7 01:24:39.437 Interface\AddOns\Ace3\AceEvent-3.0\AceEvent-3.0.lua:120

    thanks in advance for any help!

  2. #2
    blizzard have leaking variables which is causing lots of random taints, im not sure if this is one of them by you can try adding this to the top of the lua file

    Code:
    local _;
    this generally fixed the glyphing issues, might help in your case as well

  3. #3
    Quote Originally Posted by SpaceDuck View Post
    blizzard have leaking variables which is causing lots of random taints, im not sure if this is one of them by you can try adding this to the top of the lua file

    Code:
    local _;
    this generally fixed the glyphing issues, might help in your case as well
    so for example in spy.lua it looks like this at the top cause i don't know lua that well.

    Code:
    local SM = LibStub:GetLibrary("LibSharedMedia-3.0")
    local Astrolabe = DongleStub("Astrolabe-1.0")
    local AceLocale = LibStub("AceLocale-3.0")
    local L = AceLocale:GetLocale("Spy")
    
    Spy = LibStub("AceAddon-3.0"):NewAddon("Spy", "AceConsole-3.0", "AceEvent-3.0", "AceComm-3.0", "AceTimer-3.0")
    Spy.Version = "2.0"
    Spy.DatabaseVersion = "1.1"
    Spy.Signature = "[Spy]"
    Spy.ButtonLimit = 5
    Spy.MaximumPlayerLevel = MAX_PLAYER_LEVEL_TABLE[GetAccountExpansionLevel()]
    Spy.MapNoteLimit = 20
    Spy.MapProximityThreshold = 0.02
    Spy.CurrentMapNote = 1
    Spy.ZoneID = {}
    Spy.KOSGuild = {}
    Spy.CurrentList = {}
    Spy.NearbyList = {}
    Spy.LastHourList = {}
    Spy.ActiveList = {}
    Spy.InactiveList = {}
    Spy.PlayerCommList = {}
    Spy.ListAmountDisplayed = 0
    Spy.ButtonName = {}
    Spy.EnabledInZone = false
    Spy.InInstance = false
    Spy.AlertType = nil
    Spy.UpgradeMessageSent = false

    and i make it look like this?

    Code:
    local _;
    local SM = LibStub:GetLibrary("LibSharedMedia-3.0")
    local Astrolabe = DongleStub("Astrolabe-1.0")
    local AceLocale = LibStub("AceLocale-3.0")
    local L = AceLocale:GetLocale("Spy")
    
    Spy = LibStub("AceAddon-3.0"):NewAddon("Spy", "AceConsole-3.0", "AceEvent-3.0", "AceComm-3.0", "AceTimer-3.0")
    Spy.Version = "2.0"
    Spy.DatabaseVersion = "1.1"
    Spy.Signature = "[Spy]"
    Spy.ButtonLimit = 5
    Spy.MaximumPlayerLevel = MAX_PLAYER_LEVEL_TABLE[GetAccountExpansionLevel()]
    Spy.MapNoteLimit = 20
    Spy.MapProximityThreshold = 0.02
    Spy.CurrentMapNote = 1
    Spy.ZoneID = {}
    Spy.KOSGuild = {}
    Spy.CurrentList = {}
    Spy.NearbyList = {}
    Spy.LastHourList = {}
    Spy.ActiveList = {}
    Spy.InactiveList = {}
    Spy.PlayerCommList = {}
    Spy.ListAmountDisplayed = 0
    Spy.ButtonName = {}
    Spy.EnabledInZone = false
    Spy.InInstance = false
    Spy.AlertType = nil
    Spy.UpgradeMessageSent = false

  4. #4
    Deleted
    Essentially, yes.

  5. #5
    I added local _; to the top and the error still happens.

    **edit**
    Only way I can stop the error is to disable it in the Spy options while in a bg or raid. I can live with that.

    Now onto adding monks to it

    I added lines in the only places i saw other classes listed.

    Code:
    ["Class"] = {
    				["HUNTER"] = { r = 0.67, g = 0.83, b = 0.45, a = 0.6 },
    				["WARLOCK"] = { r = 0.58, g = 0.51, b = 0.79, a = 0.6 },
    				["PRIEST"] = { r = 1.0, g = 1.0, b = 1.0, a = 0.6 },
    				["PALADIN"] = { r = 0.96, g = 0.55, b = 0.73, a = 0.6 },
    				["MAGE"] = { r = 0.41, g = 0.8, b = 0.94, a = 0.6 },
    				["ROGUE"] = { r = 1.0, g = 0.96, b = 0.41, a = 0.6 },
    				["DRUID"] = { r = 1.0, g = 0.49, b = 0.04, a = 0.6 },
    				["SHAMAN"] = { r = 0.14, g = 0.35, b = 1.0, a = 0.6 },
    				["WARRIOR"] = { r = 0.78, g = 0.61, b = 0.43, a = 0.6 },
                                    ["MONK"] = { r = 0.0, g = 1.00, b = 0.59, a = 0.6 },
    				["DEATHKNIGHT"] = { r = 0.77, g = 0.12, b = 0.23, a = 0.6 },
    				["PET"] = { r = 0.09, g = 0.61, b = 0.55, a = 0.6 },
    				["MOB"] = { r = 0.58, g = 0.24, b = 0.63, a = 0.6 },
    				["UNKNOWN"] = { r = 0.1, g = 0.1, b = 0.1, a = 0.6 },
    				["HOSTILE"] = { r = 0.7, g = 0.1, b = 0.1, a = 0.6 },
    				["UNGROUPED"] = { r = 0.63, g = 0.58, b = 0.24, a = 0.6 },
    			},
    Code:
    if Spy.db.profile.Colors["Class"]["SHAMAN"] == nil then Spy.db.profile.Colors["Class"]["SHAMAN"] = Default_Profile.profile.Colors["Class"]["SHAMAN"] end
            if Spy.db.profile.Colors["Class"]["MONK"] == nil then Spy.db.profile.Colors["Class"]["MONK"] = Default_Profile.profile.Colors["Class"]["MONK"] end
    	if Spy.db.profile.Colors["Class"]["WARRIOR"] == nil then Spy.db.profile.Colors["Class"]["WARRIOR"] = Default_Profile.profile.Colors["Class"]["WARRIOR"] end
    Code:
    Spy.ValidClasses = {}
    	Spy.ValidClasses["DEATHKNIGHT"] = true
    	Spy.ValidClasses["DRUID"] = true
    	Spy.ValidClasses["HUNTER"] = true
    	Spy.ValidClasses["MAGE"] = true
            Spy.ValidClasses["MONK"] = true
    	Spy.ValidClasses["PALADIN"] = true
    	Spy.ValidClasses["PRIEST"] = true
    	Spy.ValidClasses["ROGUE"] = true
    	Spy.ValidClasses["SHAMAN"] = true
    	Spy.ValidClasses["WARLOCK"] = true
    	Spy.ValidClasses["WARRIOR"] = true
    	Spy.ValidRaces = {}
    	Spy.ValidRaces["Blood Elf"] = true
    	Spy.ValidRaces["Draenei"] = true
    	Spy.ValidRaces["Dwarf"] = true
    	Spy.ValidRaces["Goblin"] = true
    	Spy.ValidRaces["Gnome"] = true
    	Spy.ValidRaces["Human"] = true
    	Spy.ValidRaces["Night Elf"] = true
            Spy.ValidRaces["Pandaren"] = true
    	Spy.ValidRaces["Orc"] = true
    	Spy.ValidRaces["Tauren"] = true
    	Spy.ValidRaces["Troll"] = true
    	Spy.ValidRaces["Undead"] = true
    	Spy.ValidRaces["Worgen"] = true

    It works for the most part except i get this error.

    Code:
    7x AceLocale-3.0-6: Spy: Missing entry for "MONK"
    Spy-1.1.nil\List.lua:32: in function "RefreshCurrentList"
    Spy-1.1.nil\List.lua:876: in function "AddDetected"
    Spy\Spy-1.1.nil.lua:1343: in function "?"
    Ace3-Release-r1061\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:147: in function <Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:147>
    <string>:"safecall Dispatcher[1]":4: in function <string>:"safecall Dispatcher[1]":4
    <in C code>
    <string>:"safecall Dispatcher[1]":13: in function "?"
    Ace3-Release-r1061\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:92: in function "Fire"
    Ace3-Release-r1061\AceEvent-3.0\AceEvent-3.0-3.lua:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
    <in C code>
    FrameXML\ChatFrame.lua:1248: in function "?"
    FrameXML\ChatFrame.lua:4338: in function <FrameXML\ChatFrame.lua:4304>
    <in C code>
    FrameXML\ChatFrame.lua:4052: in function "ChatEdit_SendText"
    FrameXML\ChatFrame.lua:2727: in function <FrameXML\ChatFrame.lua:2720>
    <in C code>
    FrameXML\SecureTemplates.lua:379: in function "handler"
    FrameXML\SecureTemplates.lua:560: in function <FrameXML\SecureTemplates.lua:508>
    
    Locals:
    nil
    Sorry if this isn't the right forums to discuss this, but it doesn't look like any real updates will be made to it.
    Last edited by bOOURNS; 2012-09-08 at 01:54 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •