View Single Post
11-22-20, 12:42 AM   #6
Shitara
A Murloc Raider
Join Date: Nov 2020
Posts: 7
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;
  Reply With Quote