Ok, I found the problem (I have never used a built-in door since I use my custom ones, so I did not know about this thing).
The problem is that the amount of keys you have has to be saved in some variable, and you have not indicated to the engine in which variable (this has to be done for any type of item, so you may get the same problem for other items you create).
You just need to add something like this
item:set_savegame_variable("id_for_the_amount_of_keys")
inside the function "item:on_created()".
(you can use there any string you want (so change the string to a shorter one if you want), and that variable will be used for all keys of your game).
You will have something like this:
function item:on_created()
item:set_savegame_variable("id_for_the_amount_of_keys")
item:set_shadow("small")
item:set_can_disappear(false)
item:set_brandish_when_picked(true)
item:set_sound_when_picked("picked_small_key")
end
You can now delete the previous link to your data in mediafire.
PS: you can also ask on the IRC chat whenever you want, and don't hesitate to ask if you have any problem.
