[Arcturus] Pets don't show up in inventory
Hi
When I buy multiple pets and go to my inventory to place them in the room the emulator gives this error:
'Field 'pet_name' doesn't have a default value
I changed the structure of pet_actions to:
Code:
DROP TABLE IF EXISTS `pet_actions`;CREATE TABLE `pet_actions` ( `pet_type` int(2) NOT NULL AUTO_INCREMENT, `pet_name` varchar(32) NOT NULL DEFAULT '', `happy_actions` varchar(100) NOT NULL DEFAULT '', `tired_actions` varchar(100) NOT NULL DEFAULT '', `random_actions` varchar(100) NOT NULL DEFAULT '', PRIMARY KEY (`pet_type`)) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=latin1;
The error vanished but gave a new error and the pets still won't show up in my inventory:
--> Screenshot by Lightshot
Is this a packet bug or a configuration bug?
Not sure if there are more people with this problem.
Thanks in advance
Cheers :P:
Re: [Arcturus] Pets don't show up in inventory
What happens if you change it to
Quote:
DROP TABLE IF EXISTS `pet_actions`;CREATE TABLE `pet_actions` ( `pet_type` int(2) NOT NULL AUTO_INCREMENT, `pet_name` varchar(32) NOT NULL DEFAULT 'Dog', `happy_actions` varchar(100) NOT NULL DEFAULT '', `tired_actions` varchar(100) NOT NULL DEFAULT '', `random_actions` varchar(100) NOT NULL DEFAULT '', PRIMARY KEY (`pet_type`)) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=latin1;
Re: [Arcturus] Pets don't show up in inventory
Quote:
Originally Posted by
Joorren
What happens if you change it to
Did not help. The inventory for pets is still a loading page
- - - Updated - - -
Changing the structure from users_pets did the thing.
The one that caused the bugg:
Code:
SET FOREIGN_KEY_CHECKS=0;-- ------------------------------ Table structure for `users_pets`-- ----------------------------DROP TABLE IF EXISTS `users_pets`;CREATE TABLE `users_pets` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `room_id` int(11) NOT NULL, `name` varchar(15) NOT NULL DEFAULT 'User Pet', `race` int(11) NOT NULL, `type` int(11) NOT NULL, `color` varchar(6) NOT NULL, `happyness` int(11) NOT NULL DEFAULT '100', `experience` int(11) NOT NULL DEFAULT '0', `energy` int(11) NOT NULL DEFAULT '100', `hunger` int(3) NOT NULL DEFAULT '0', `thirst` int(3) NOT NULL DEFAULT '0', `respect` int(11) NOT NULL DEFAULT '0', `created` int(11) NOT NULL, `x` int(11) NOT NULL DEFAULT '0', `y` int(11) NOT NULL DEFAULT '0', `z` double NOT NULL DEFAULT '0', `rot` int(11) NOT NULL DEFAULT '0', `hair_style` int(3) NOT NULL DEFAULT '-1', `hair_color` int(3) NOT NULL DEFAULT '0', `saddle` enum('0','1') NOT NULL DEFAULT '0', `ride` enum('0','1') NOT NULL DEFAULT '0', `mp_type` int(3) NOT NULL DEFAULT '0', `mp_color` int(3) NOT NULL DEFAULT '0', `mp_nose` int(3) NOT NULL DEFAULT '0', `mp_nose_color` tinyint(2) NOT NULL DEFAULT '0', `mp_eyes` int(3) NOT NULL DEFAULT '0', `mp_eyes_color` tinyint(2) NOT NULL DEFAULT '0', `mp_mouth` int(3) NOT NULL DEFAULT '0', `mp_mouth_color` tinyint(2) NOT NULL DEFAULT '0', `mp_death_timestamp` int(11) NOT NULL DEFAULT '0', `mp_breedable` enum('0','1') NOT NULL DEFAULT '0', `mp_allow_breed` enum('0','1') NOT NULL DEFAULT '0', `gnome_data` varchar(80) NOT NULL DEFAULT '', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;
The one that fixed it:
Code:
SET FOREIGN_KEY_CHECKS=0;-- ------------------------------ Table structure for `users_pets`-- ----------------------------DROP TABLE IF EXISTS `users_pets`;CREATE TABLE `users_pets` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `room_id` int(11) NOT NULL, `name` varchar(15) NOT NULL DEFAULT 'User Pet', `race` int(11) NOT NULL, `type` int(11) NOT NULL, `color` varchar(6) NOT NULL, `happyness` int(11) NOT NULL DEFAULT '100', `experience` int(11) NOT NULL DEFAULT '0', `energy` int(11) NOT NULL DEFAULT '100', `hunger` int(3) NOT NULL DEFAULT '0', `thirst` int(3) NOT NULL DEFAULT '0', `respect` int(11) NOT NULL DEFAULT '0', `created` int(11) NOT NULL, `x` int(11) NOT NULL DEFAULT '0', `y` int(11) NOT NULL DEFAULT '0', `z` double NOT NULL DEFAULT '0', `rot` int(11) NOT NULL DEFAULT '0', `hair_style` int(3) NOT NULL DEFAULT '-1', `hair_color` int(3) NOT NULL DEFAULT '0', `saddle` enum('0','1') NOT NULL DEFAULT '0', `ride` enum('0','1') NOT NULL DEFAULT '0', `mp_type` int(3) NOT NULL DEFAULT '0', `mp_color` int(3) NOT NULL DEFAULT '0', `mp_nose` int(3) NOT NULL DEFAULT '0', `mp_nose_color` tinyint(2) NOT NULL DEFAULT '0', `mp_eyes` int(3) NOT NULL DEFAULT '0', `mp_eyes_color` tinyint(2) NOT NULL DEFAULT '0', `mp_mouth` int(3) NOT NULL DEFAULT '0', `mp_mouth_color` tinyint(2) NOT NULL DEFAULT '0', `mp_death_timestamp` int(11) NOT NULL DEFAULT '0', `mp_breedable` enum('0','1') NOT NULL DEFAULT '0', `mp_allow_breed` enum('0','1') NOT NULL DEFAULT '0', `gnome_data` varchar(80) NOT NULL DEFAULT '', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
That 'fix' only helped 2 hours. The bug somehow recreated itself...