Error: attempt to compare number with nil stack traceback

I’m having an issue when trying to access data from a predefined table:

playerStats is a global table; spell1 is set to 1 and spell23 and spell41 are both set to 0.

Any ideas?

if (playerStats.spell1 \> 0 or playerStats.spell23 \> 0 or playerStats.spell41 \> 0) then spellOne = playerStats.spell1 + playerStats.spell23 + playerStats.spell41 end

EDIT: I’ve narrowed it down to playerStats.spell1, playerStats.spell23, playerStats.spell41 are all yielding a nil value. Does anyone know why it would be nil rather than the value I have them set at?

SOLVED! I figured out that I was loading a previously saved table and it did not have the updated table.