yeah
As for plaeyr being defined, that's the closure thing we talked about.
player is defined outside the funtion, so when the function gets reloaded from a savefile it wont be able to access it anymore.
There are 3 kinds of variables:
* globals: they are defined globaly and sthus can be refered from a saved function
* locals: they are defined inside the scope of the function, and thus work too
* upvalues: they are references to locals defined in the caller (or caller of caller, ...) of the function, and thus do not work when reloaded because the caller scope does not exist anymore at this point
(ok they are not realyl three kinds at all, but that's good enough to explain the phenomenom

)