Equip Recommended Gear

Equip Recommended Gear

3.5k Downloads

Attempt to Compare Nil with Number (Round 2)

Saaappi opened this issue ยท 5 comments

commented
CLICK ME!
14x EquipRecommendedGear/Core.lua:334: attempt to compare nil with number
[string "@EquipRecommendedGear/Core.lua"]:334: in function `DoTheThing'
[string "@SkySuite/_Functions/Quests.lua"]:14: in function <SkySuite/_Functions/Quests.lua:9>

Locals:
msg = 1
itemLevel = <table> {
 1 = 9999
 2 = 9999
 3 = 9999
 5 = 9999
 6 = 259
 7 = 9999
 8 = 246
 9 = 226
 10 = 252
 11 = 9999
 12 = 9999
 13 = 9999
 14 = 9999
 15 = 9999
}
bag = <table> {
 1 = 30
 2 = 30
 3 = 30
 4 = 30
 5 = 32
 0 = 20
}
item = <table> {
 1 = <table> {
 }
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
 16 = <table> {
 }
 17 = <table> {
 }
 18 = <table> {
 }
 19 = <table> {
 }
}
armorClass = "Plate"
primaryStat = "ITEM_MOD_STRENGTH_SHORT"
upgrade = <table> {
 1 = <table> {
 }
}
weaponUpgrade = <table> {
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = <table> {
 }
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
 16 = <table> {
 }
 17 = <table> {
 }
 18 = <table> {
 }
 19 = <table> {
 }
}
(for control) = 10
k = 10
v = <table> {
 ilv = 256
 type = "4.0"
 item = "|cff0070dd|Hitem:200439::::::::63:251::17:2:9156:6652:2:28:2424:9:63:::::|h[Earthpact Scepter]|h|r"
 slot = "INVTYPE_HOLDABLE"
}
equippable = true
weapon = false
itemID = 200439
compareItemLevel = nil
(*temporary) = 256
(*temporary) = "INVTYPE_HOLDABLE"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 1473
(*temporary) = "ITEM_MOD_VERSATILITY"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 72
(*temporary) = <table> {
 ITEM_MOD_STRENGTH_SHORT = 107
 ITEM_MOD_CRIT_RATING_SHORT = 85
 ITEM_MOD_STAMINA_SHORT = 289
 ITEM_MOD_DAMAGE_PER_SECOND_SHORT = 80.555557
 ITEM_MOD_VERSATILITY = 72
}
(*temporary) = 146220
(*temporary) = 72
(*temporary) = <table> {
 ilv = 9999
 type = "2.7"
 item = "|cff00ccff|Hitem:122389:6243:::::::63:251:::1:9354:::::Player-1426-0DF47BD1:|h[Bloodsoaked Skullforge Reaver]|h|r"
 slot = "INVTYPE_WEAPON"
}
(*temporary) = "2.7"
(*temporary) = "."
(*temporary) = "7"
(*temporary) = "attempt to compare nil with number"
app = <table> {
 api = <table> {
 }
 DoingStuff = false
 Initialise = <function> defined @EquipRecommendedGear/Core.lua:52
 Armor = <table> {
 }
 CreateAssets = <function> defined @EquipRecommendedGear/Core.lua:61
 Stat = <table> {
 }
 NameLong = "|R|cffC69B6DEquip Recommended Gear|R"
 Type = <table> {
 }
 Slot = <table> {
 }
 NameShort = "|R|cffC69B6DERG|R"
 DualWield = <table> {
 }
 CanDualWield = true
 Level = 63
 Dump = <function> defined @EquipRecommendedGear/Core.lua:26
 ClassID = 6
 Sex = 0
 Button = rcButton {
 }
 SpecID = 251
 Print = <function> defined @EquipRecommendedGear/Core.lua:43
 Weapon = <table> {
 }
}
commented

Alright this seemed to be an issue with off-hands and me for some reason not adding all specIDs in the check for its eligibility. Hopefully fixed with e1935b4.

commented

Given the error is the same, I'm going to just re-post the stack trace here instead of a new issue.

60x EquipRecommendedGear/Core.lua:337: attempt to compare nil with number
[string "@EquipRecommendedGear/Core.lua"]:337: in function `DoTheThing'
[string "@SkySuite/_Functions/Quests.lua"]:14: in function <SkySuite/_Functions/Quests.lua:9>

Locals:
msg = 1
itemLevel = <table> {
 1 = 9999
 2 = 9999
 3 = 9999
 5 = 9999
 6 = 272
 7 = 9999
 8 = 236
 9 = 184
 10 = 236
 11 = 9999
 12 = 9999
 13 = 9999
 14 = 9999
 15 = 9999
}
bag = <table> {
 1 = 30
 2 = 30
 3 = 30
 4 = 30
 5 = 32
 0 = 20
}
item = <table> {
 1 = <table> {
 }
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
}
armorClass = "Leather"
primaryStat = "ITEM_MOD_AGILITY_SHORT"
upgrade = <table> {
}
weaponUpgrade = <table> {
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = <table> {
 }
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
}
(for control) = 2
k = 2
v = <table> {
 ilv = 272
 type = "4.0"
 item = "|cff1eff00|Hitem:197675::::::::65:269::25:1:8768:2:28:2437:9:65:::::|h[Code of the Maruuk]|h|r"
 slot = "INVTYPE_HOLDABLE"
}
equippable = true
weapon = false
itemID = 197675
compareItemLevel = nil
(*temporary) = 272
(*temporary) = "INVTYPE_HOLDABLE"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 73
(*temporary) = "ITEM_MOD_STAMINA_SHORT"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 179
(*temporary) = <table> {
 ITEM_MOD_INTELLECT_SHORT = 191
 ITEM_MOD_MASTERY_RATING_SHORT = 39
 ITEM_MOD_CRIT_RATING_SHORT = 46
 ITEM_MOD_STAMINA_SHORT = 179
}
(*temporary) = 142597
(*temporary) = 179
(*temporary) = <table> {
 ilv = 9999
 type = "2.4"
 item = "|cff00ccff|Hitem:122385:6641:::::::65:269:::1:9354:::::Player-1426-0DEE000B:|h[Venerable Mass of McGowan]|h|r"
 slot = "INVTYPE_WEAPON"
}
(*temporary) = "2.4"
(*temporary) = "."
(*temporary) = "4"
(*temporary) = "attempt to compare nil with number"
app = <table> {
 api = <table> {
 }
 DoingStuff = false
 Print = <function> defined @EquipRecommendedGear/Core.lua:43
 Armor = <table> {
 }
 CreateAssets = <function> defined @EquipRecommendedGear/Core.lua:61
 Stat = <table> {
 }
 NameLong = "|R|cffC69B6DEquip Recommended Gear|R"
 Type = <table> {
 }
 Slot = <table> {
 }
 NameShort = "|R|cffC69B6DERG|R"
 DualWield = <table> {
 }
 CanDualWield = true
 Dump = <function> defined @EquipRecommendedGear/Core.lua:26
 Level = 65
 ClassID = 10
 Button = rcButton {
 }
 SpecID = 269
 Initialise = <function> defined @EquipRecommendedGear/Core.lua:52
 Weapon = <table> {
 }
}
commented

Presumably fixed with 4692cd3

commented

Was able to reproduce the issue, fixed with dd5e85e. :)

commented

Unfortunately, that commit didn't address the issue. You can see I'm on the latest commit, as well:

$ git log
commit 4692cd394f0c44f2faf7e5a73ff432ecbcd66a01 (HEAD -> main, origin/main, origin/HEAD)
Author: Sluimerstand <[email protected]>
Date:   Thu Apr 4 11:56:31 2024 +0200

    Equippable weapons with the wrong main stat no longer cause errors
83x EquipRecommendedGear/Core.lua:337: attempt to compare nil with number
[string "@EquipRecommendedGear/Core.lua"]:337: in function `DoTheThing'
[string "@SkySuite/_Functions/Quests.lua"]:14: in function <SkySuite/_Functions/Quests.lua:9>

Locals:
msg = 1
itemLevel = <table> {
 1 = 9999
 2 = 9999
 3 = 9999
 5 = 9999
 6 = 272
 7 = 9999
 8 = 236
 9 = 184
 10 = 236
 11 = 9999
 12 = 9999
 13 = 9999
 14 = 9999
 15 = 9999
}
bag = <table> {
 1 = 30
 2 = 30
 3 = 30
 4 = 30
 5 = 32
 0 = 20
}
item = <table> {
 1 = <table> {
 }
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
}
armorClass = "Leather"
primaryStat = "ITEM_MOD_AGILITY_SHORT"
upgrade = <table> {
}
weaponUpgrade = <table> {
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = <table> {
 }
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
 7 = <table> {
 }
 8 = <table> {
 }
 9 = <table> {
 }
 10 = <table> {
 }
 11 = <table> {
 }
 12 = <table> {
 }
 13 = <table> {
 }
 14 = <table> {
 }
 15 = <table> {
 }
}
(for control) = 2
k = 2
v = <table> {
 ilv = 272
 type = "4.0"
 item = "|cff1eff00|Hitem:197675::::::::65:269::25:1:8768:2:28:2437:9:65:::::|h[Code of the Maruuk]|h|r"
 slot = "INVTYPE_HOLDABLE"
}
equippable = true
weapon = false
itemID = 197675
compareItemLevel = nil
(*temporary) = 272
(*temporary) = "INVTYPE_HOLDABLE"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 73
(*temporary) = "ITEM_MOD_STAMINA_SHORT"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 179
(*temporary) = <table> {
 ITEM_MOD_INTELLECT_SHORT = 191
 ITEM_MOD_MASTERY_RATING_SHORT = 39
 ITEM_MOD_CRIT_RATING_SHORT = 46
 ITEM_MOD_STAMINA_SHORT = 179
}
(*temporary) = 142597
(*temporary) = 179
(*temporary) = <table> {
 ilv = 9999
 type = "2.4"
 item = "|cff00ccff|Hitem:122385:6641:::::::65:269:::1:9354:::::Player-1426-0DEE000B:|h[Venerable Mass of McGowan]|h|r"
 slot = "INVTYPE_WEAPON"
}
(*temporary) = "2.4"
(*temporary) = "."
(*temporary) = "4"
(*temporary) = "attempt to compare nil with number"
app = <table> {
 api = <table> {
 }
 DoingStuff = false
 Print = <function> defined @EquipRecommendedGear/Core.lua:43
 Armor = <table> {
 }
 CreateAssets = <function> defined @EquipRecommendedGear/Core.lua:61
 Stat = <table> {
 }
 NameLong = "|R|cffC69B6DEquip Recommended Gear|R"
 Type = <table> {
 }
 Slot = <table> {
 }
 NameShort = "|R|cffC69B6DERG|R"
 DualWield = <table> {
 }
 CanDualWield = true
 Dump = <function> defined @EquipRecommendedGear/Core.lua:26
 Level = 65
 ClassID = 10
 Button = rcButton {
 }
 SpecID = 269
 Initialise = <function> defined @EquipRecommendedGear/Core.lua:52
 Weapon = <table> {
 }
}
</details>