Fix the shop script.
No need for this conversion actually, there is luaL_checkint() for this.