View Full Version : Breeding pets from Shop
River cat
06-03-2013, 05:18 AM
Hello to you all again.
I got a some sort of problem, and I would like to find some sort of solution for it.
I tested breeding system of my site, and it works totally fine, exept one thing. All pets from adoptshop couldn't be breed. I checked prefix_owned_adoptables in my database, and when normal adoptables gets 0 in lastbreed box, adoptables from shop gets NULL. Of course I can edit this box, and then this adoptable could be breed, but I really don't want to do that every time by hands. Is there any way to make adoptables from the shop gets 0 instead NULL after purchase?
Thank you, Best Regards, River.
Hall of Famer
06-10-2013, 06:59 PM
Did you figure out the solution already? I saw you send me two profile comments but deleted them afterwards.
River cat
06-14-2013, 12:48 AM
Hello, nope, I didn't find any solution for right now. I will be very glad if you will help me.
Also, sorry, I asked you a few things, but I already found a way to solve it, so I deleted my comments ^^"
Ruinily
06-14-2013, 05:21 AM
I've just checked and I'm the same, their saying null instead of 0. :/ Promocode pets are alright though lol.
Hall of Famer
06-16-2013, 11:43 AM
Oh yeah, the field NULL is the problem. Change it to 0 will resolve the problem, but a better solution is to change the database column into type int rather than varchar.
Ruinily
06-16-2013, 10:21 PM
'13 lastbred int(11) Yes NULL'
Um, thats what my database says in that column, its already int? Is there any chance I could just set the default to 0 so it'd always start off with 0, or would that mean it'd stay 0 -.-' And is there anyway to change all the values of a column since theres 20 pages of creatures on my site? -.-'
River cat
06-16-2013, 11:46 PM
Thank you, Hall of Famer, my problem is resolved now.
I changed lastbred coloumn, default from NULL to no, and I removed the checked box form NULL.
Ruinily, I resolved this, and it lets all adoptable to breed, I just can't describe properly what I did, because I'm not sure how to tranclate.
Hall of Famer
06-17-2013, 02:10 AM
Well actually this is a minor glitch with the database tables, not the script itself. As I said before, you need to make sure the column lastbred is int type, not varchar. Int type cannot be NULL, its default value is usually 0.
And glad it fixes your problem River Cat.
River cat
06-17-2013, 04:59 AM
Hall of Famer, lastbred coloumn was int type, so problem was not here, I think. ^^"
Hall of Famer
06-17-2013, 12:20 PM
I see, this is kinda strange. I thought int columns cannot have NULL value, looks like I was mistaken. Guess it is necessary to set the default to be 0 upon script installation to fix the problem for good, thanks for telling me this.
Ruinily
06-17-2013, 07:32 PM
Cool it looks like its working now, good job River Cat. ^_^ Thanks.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.