Hey,
I'm currently working on a CP 2.0 Addon. Every time I load the CPs it's working fine untill the point where I open the CP Scene and get the following error:
Code:
EsoUI/Ingame/Champion/Champion.lua:2285: attempt to index a nil value
stack traceback:
EsoUI/Ingame/Champion/Champion.lua:2285: in function 'ChampionPerks:OnUpdate'
<Locals> self = [table:1]{keybindState = 1, cameraRootY = 800, constellationOuterRadius = 528, cameraPanZ = 0, constellationInnerRadius = 190, keybindStripId = 2, isChampionSystemNew = F, cameraAnimationOffsetX = 0, startCameraZ = -1, cameraAnimationOffsetZ = 0, isInRespecMode = F, constellationsInitialized = T, startCameraY = 800, cameraPanY = 0, confirmAnimationPlaying = T, firstStarConfirm = F, awaitingSpendPointsResponse = F, startAngle = 2.6179938779915, cameraRootX = 0, startCameraX = -0, constellationHeight = 338, t = 0.010000400000081, lastHealthValue = 20002, cameraAnimationOffsetY = 0, initialized = T, cameraPanX = 0, nextConfirmAnimationTime = 4010.8349121094, cameraRootZ = -1}, timeSecs = 4010.5349121094, frameDeltaSecs = 0.010000400000081, isEnteringConstellation = F </Locals>
EsoUI/Ingame/Champion/Champion.lua:1170: in function '(anonymous)'
<Locals> _ = ud, timeSecs = 4010.5349121094 </Locals>
I don't really know if the mistake is on my part, since I do exactly the same thing as other addons.
The loading code is the following:
Code:
for slotIndex = 1, 12 do
if cptable[setId][slotIndex] ~= nil then
AddHotbarSlotToChampionPurchaseRequest(slotIndex, cptable[setId][slotIndex])
end
end
SendChampionPurchaseRequest()
Yes, I'm aware of the cooldown in between. The addon does wait 30s in between the changes.
Has anyone seen the error before and can help me?
Thanks in advance.