View Single Post
10-13-17, 09:58 PM   #8
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 10-13-17 at 10:27 PM.
  Reply With Quote