Firstly, I have no iea what could cause the error in the givepokemon.
Secondly, you can't use the command Hidden. It doesn't work at most times.
My advice is, before you start the script, use a new script that hides the person.
EDIT: Or maybe it could be that you needed to use showsprite 0xF because 15 is F in Hex.