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)
You don't really need all the [" "]
Code:
self.stat.pv = {
stat = -- Int,
EV = -- Int,
IV = -- Int,
reel = -- Int,
reelactu = -- Int,
}
but that's entirely up to you.
I'm not metatable enabled so there is probably a more direct method using it.