Bagnon

Bagnon

126M Downloads

GetItemContainerInfo doesn't seem to exist in classic

jeske opened this issue ยท 0 comments

commented

I'm not a wow-addon pro, but it seems like maybe GetContainerItemInfo didn't exist in classic.

I fixed the error below by changing the Prices.OnBag function to test for the existance of the function before using it:

function Prices.OnBag(tip, bag, slot)
    if GetContainerItemInfo then
        local _, count, _,_,_,_,_,_,_, id = GetContainerItemInfo(bag, slot)
        Prices:AddLine(tip, id, count, true)
    end
end

Date: 2023-09-08 08:33:39
ID: 1
Error occured in: Global
Count: 1
Message: Interface/AddOns/Scrap/addons/main/pricing.lua line 41:
   attempt to call global 'GetContainerItemInfo' (a nil value)
Debug:
   [string "@Interface/AddOns/Scrap/addons/main/pricing.lua"]:41:
      Interface/AddOns/Scrap/addons/main/pricing.lua:39
   [string "=[C]"]: SetBagItem()
   [string "@Interface/AddOns/TitanClassicRepair/TitanClassicRepair.lua"]:611: TitanRepair_GetStatus()
   [string "@Interface/AddOns/TitanClassicRepair/TitanClassicRepair.lua"]:478: TitanRepair_GetInventoryInformation()
   [string "@Interface/AddOns/TitanClassicRepair/TitanClassicRepair.lua"]:369: TitanPanelRepairButton_OnUpdate()
   [string "@Interface/AddOns/TitanClassicRepair/TitanClassicRepair.lua"]:324: TitanPanelRepairButton_OnEvent()
   [string "*TitanClassicRepair.xml:14_OnEvent"]:1:
      [string "*TitanClassicRepair.xml:14_OnEvent"]:1
Locals:
tip = TitanRepairTooltip {
 0 = <userdata>
 layoutType = "TooltipDefaultLayout"
 GetBackdropColor = <function> defined @Interface/SharedXML/SharedTooltipTemplates.lua:290
 SetQuestLogItem = <function> defined =[C]:-1
 SetTradeSkillItem = <function> defined =[C]:-1
 BottomOverlay = Texture {
 }
 SetBackdropBorderColor = <function> defined @Interface/SharedXML/SharedTooltipTemplates.lua:294
 SetCraftItem = <function> defined =[C]:-1
 updateTooltip = 0.200000
 __hasCounters = true
 TooltipBackdropOnLoad = <function> defined @Interface/SharedXML/SharedTooltipTemplates.lua:271
 TopOverlay = Texture {
 }
 GetBackdropBorderColor = <function> defined @Interface/SharedXML/SharedTooltipTemplates.lua:298
 needsReset = true
 SetBorderBlendMode = <function> defined @Interface/SharedXML/SharedTooltipTemplates.lua:302
 SetBackdropColor = <function> defined @Interface/SharedXML/SharedTooltipTemplates.lua:286
 SetQuestItem = <function> defined =[C]:-1
 NineSlice = Frame {
 }
}
bag = 0
slot = 1
(*temporary) = nil
(*temporary) = 0
(*temporary) = 1
(*temporary) = "attempt to call global 'GetContainerItemInfo' (a nil value)"
Prices = <table> {
 SendSignal = <function> defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:82
 OnMail = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:61
 OnBag = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:39
 RegisterMessage = <function> defined @Interface/AddOns/AI_VoiceOver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
 UnregisterMessage = <function> defined @Interface/AddOns/AI_VoiceOver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
 OnQuest = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:52
 AddLine = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:25
 OnSetCraftItem = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:74
 SendMessage = <function> defined @Interface/AddOns/AI_VoiceOver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
 UnregisterSignal = <function> defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78
 RegisterEvent = <function> defined @Interface/AddOns/AI_VoiceOver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
 UnregisterAllMessages = <function> defined @Interface/AddOns/AI_VoiceOver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
 OnInventory = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:46
 OnLink = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:78
 OnSetTradeSkillItem = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:66
 OnEnable = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:12
 OnLoot = <function> defined @Interface/AddOns/Scrap/addons/main/pricing.lua:57
 UnregisterAllEvents = <function> defined @Interface/AddOns/AI_VoiceOver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
 RegisterSignal = <function> defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:74
 NewModule = <function> defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:68
 UnregisterEvent = <function> defined @Interface/AddOns/AI_VoiceOver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
 Tag = "SCRAP_"
}

AddOns:
  Swatter, v3.4.6977 (SwimmingSeadragon)
  AIVoiceOver, v1.4.2
  AIVoiceOverDataVanilla, v0.1
  AtlasLootClassic, vv3.1.3
  AtlasLootClassicData, vv3.1.3
  AtlasLootClassicDungeonsAndRaids, vv3.1.3
  AtlasLootClassicMaps, vv1.0.0
  AucAdvanced, v3.4.6952 (SwimmingSeadragon)
  AucFilterBasic, v3.4.6941 (SwimmingSeadragon)
  AucStatHistogram, v3.4.6928 (SwimmingSeadragon)
  AucStatiLevel, v3.4.6913 (SwimmingSeadragon)
  AucStatPurchased, v3.4.6910 (SwimmingSeadragon)
  AucStatSimple, v3.4.6911 (SwimmingSeadragon)
  AucStatStdDev, v3.4.6912 (SwimmingSeadragon)
  AucUtilFixAH, v3.4.6914 (SwimmingSeadragon)
  BagBrother, v
  Bagnon, v10.1.4
  BagnonBoE, v2.0.67-Release
  BagnonGarbage, v2.0.55-Release
  BagnonScrap, v10.1.1
  BagSync, v19.19
  BeanCounter, v3.4.6983 (SwimmingSeadragon)
  ClassicBestiary, v1.0.4
  DBMCore, v322cbac
  DBMStatusBarTimers, v322cbac
  DBMVPVEM, v6b4f4f1
  Details, v#Details.20230825.11857.155
  DetailsCompare2, v
  DetailsEncounterDetails, v
  DetailsRaidCheck, v
  DetailsStreamer, v
  DetailsTinyThreat, v
  DetailsVanguard, v
  Enchantrix, v3.4.6979 (SwimmingSeadragon)
  EnchantrixBarker, v3.4.6917 (SwimmingSeadragon)
  GryphonsRemover, vv1.3.9
  Informant, v3.4.6980 (SwimmingSeadragon)
  LeatrixMaps, v1.14.126
  LeatrixPlus, v1.14.126
  MoveToolTip, v1.0.6
  NeatMinimap, vv1.10.05
  NovaInstanceTracker, v1.45
  NovaWorldBuffs, v2.55
  PartyPetFrames, v1.1.7
  PetAbilities, v1.2.r20
  Plater, vPlater-v564-Classic
  Questie, v8.9.0
  QuestieShutUp, v1.0
  RXPGuides, vv4.5.19
  Scrap, v10.1.1
  ShadowedUFNotMyAuras, vv0.1.10
  ShadowedUnitFrames, vv4.3.4-classic
  SlideBar, v3.4.6919 (SwimmingSeadragon)
  Stubby, v3.4.6920 (SwimmingSeadragon)
  Tamed, v1.13.9
  TargetHealth, v1.0.5
  TitanClassic, v1.3.3.11404
  TitanClassicAmmo, v1.3.3.11404
  TitanClassicBag, v1.3.3.11404
  TitanClassicClock, v1.3.3.11404
  TitanClassicGold, v1.3.3.11404
  TitanClassicLocation, v1.3.3.11404
  TitanClassicLootType, v1.3.3.11404
  TitanClassicPerformance, v1.3.3.11404
  TitanClassicRegen, v1.3.3.11404
  TitanClassicRepair, v1.3.3.11404
  TitanClassicRestPlus, v1.0.0.2
  TitanClassicVolume, v1.3.3.11404
  TitanClassicXP, v1.3.3.11404
  WeakAuras, v5.7.1
  WhatsTraining, v5.0.2
  BlizRuntimeLib v1.14.4.51146(US) <enUS>
  (ck=8d7)