Originally Posted by Seerah
It sounds like you missed something somewhere. What is your code?
|
Code:
-- Class Pokemon --
CPA_Pokemon_Class = {}
CPA_Pokemon_Class.__index = CPA_Pokemon_Class
function CPA_Pokemon_Class:New()
local self = {}
setmetatable(self, CPA_Pokemon_Class)
self.stat = {}
self.stat.pv = {
["stat"] = -- Int,
["EV"] = -- Int,
["IV"] = -- Int,
["reel"] = -- Int,
["reelactu"] = -- Int,
}
return self
end
function CPA_Pokemon_Class:InitFight()
for i, stat in pairs(self.stat) do
-- Do some stuff
end
end
This is a part of my code (yes, it's a pokemon game), 5 others stats (stat.att, stat.def...) are set in the same way. Each "-- Int" is a simple integer value (5, 18, 27...) stored in a "DB" table.
'do' is here, I don't understand what I missed.