Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 04-06-2018, 08:16 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 90,066
Dinocanid is on a distinguished road
Default

Quote:
Originally Posted by Phoeniix View Post
K thanks, but ive run into another issue, when inputting (if num<0) when i insert the code i get a blank breeding.php page. when i take it out the page is normal, is there something off with the code?
Does it look like this when you do it?
PHP Code:
if($num 0){
$offsprings $breeding->getOffsprings(); 
                
$offspringID $mysidia->db->select("owned_adoptables", array("aid"), "1 ORDER BY aid DESC LIMIT 1")->fetchColumn() - $num 1;  
                
$links = new LinkedList
                
$newbabies = array(); // Kyt: Added line for Descendants Mod!! 
                
foreach($offsprings as $offspring){ 
                    
$newbabies[] = $offspringID// Kyt: Added line for Descendants Mod!! 
                    
$image $offspring->getEggImage("gui"); 
                    
$links->add(new Link("myadopts/manage/{$offspringID}"$image)); 
                    
$offspringID++; 
                } 
                
$this->setField("links"$links); 
/* Kyt: Descendants Mod!! */ 
if ($female->descendants != 0){ $mothersOffspring $female->descendants; } else { $mothersOffspring ""; } 
if (
$male->descendants != 0){ $fathersOffspring $male->descendants; } else { $fathersOffspring ""; } 

for(
$i 0$i count($newbabies); $i++){ 
    
$mothersOffspring .= $newbabies[$i].","
    
$fathersOffspring .= $newbabies[$i].","


$updatedMotherOffspring preg_replace('/^(0,)+/'''$mothersOffspring); 
$updatedFatherOffpsring preg_replace('/^(0,)+/'''$fathersOffspring); 

$mysidia->db->update("owned_adoptables", array("descendants" => $updatedMotherOffspring), "aid = '{$female->aid}'"); 
$mysidia->db->update("owned_adoptables", array("descendants" => $updatedFatherOffpsring), "aid = '{$male->aid}'"); 
/* Descendants Mod End!! */

__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:43 AM.

Currently Active Users: 2625 (0 members and 2625 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636