Thread: CP 2.0 Error
View Single Post
03/21/21, 10:07 AM   #3
ownedbynico
AddOn Author - Click to view addons
Join Date: Nov 2019
Posts: 9
Originally Posted by Sharlikran View Post
Which line is 2285? If it is "if cptable[setId][slotIndex] ~= nil then" then the table does not have the values at the time it is looked at. So while you are saying "~= nil" the table, setId, and slotIndex need to be defined.

if cptable[setId] == nil then cptable[setId] = {} end
if cptable[setId][slotIndex] == nil then cptable[setId][slotIndex] = {} end

The table will be empty and not nil.

However, I don't think you can have cptable[setId][slotIndex] = nil, if I understand correctly because nil is not important so it would just be cptable[setId] = <<whatever>>
Champion.lua is not my code, it's from the Api. And the table cptable cannot be empty at this point.
https://github.com/esoui/esoui/blob/...pion.lua#L2285
It's a function for CP animations.

Last edited by ownedbynico : 03/21/21 at 10:09 AM.
  Reply With Quote