So is there a way I can get it to realize that when the pet doesn't exist it's 0, zero, not nil? or that it's ok that the pet doesn't exist? and just record the existing pet/s
a couple of lines down it tells it to either record/add 0 or 1
I'm presuming that's not enough?
Code:
_G.BattleDexDB.pets[species][key] = _G.BattleDexDB.pets[species][key] or 0;
_G.BattleDexDB.pets[species][key] = _G.BattleDexDB.pets[species][key] + 1;