Invalid adoptable id error is usually caused by mismatch of your owned_adoptables table and this line in doadopt.php below:
PHP Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender','$loggedinname', 'Happy', '$side', '$MAXHP', '$MAXHP', '$Attack', '$Defense', '$Speed', '$Evade', '$Element','$evolution','$evolutionlevel','$evolutionform', '$evolutionform2'))");
I'd advise you to look at your prefix_owned_adoptables table carefully, or you may want to post a screenshot of your database table structure of prefix_owned_adoptables.
Also I recommend you to edit out this part of the codes from all your script files:
PHP Code:
// **********************************************************************
// Rusnak PHP Adoptables Script
// Copyright 2009 Brandon Rusnak
// For help and support: http://www.rusnakweb.com/forum/
//
// Redistribution prohibited without written permission
// **********************************************************************