Originally Posted by Fizzlemizz
local self = {}
Is local to that chunk of code (in this case function) hence doesn't exist in the lower function and has not been passed to it. You would need too:
Code:
function CPA_Pokemon_Class:InitFight(table)
for key, stat in pairs(table.stat.pv) do
print(key, value)
end
end
local table = CPA_Pokemon_Class:New()
CPA_Pokemon_Class:InitFight(table)
|
I tried this, same error.
PS : The function isn't even called, it's like a syntax error.