You are doing something wrong man, i tested the code and it works.

Dont forget to put:

playerstats[HP] = playerstats_level_01[HP];
playerstats[SP] = playerstats_level_01[SP];

in a function, like main for instance.

In your first code you had those instructions outside of function, if you know what i mean..

Hope it helps