View Single Post
10-14-17, 05:11 AM   #9
Alizia
A Murloc Raider
Join Date: Oct 2017
Posts: 8
Originally Posted by Fizzlemizz View Post
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.

Last edited by Alizia : 10-14-17 at 07:53 AM.
  Reply With Quote