I found it.. nevermind... but i do have errorsafter buying pet food and trying to feed my pet i get this errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' happy = happy + WHERE pet_id = 3 AND ownerid = 5' at line 1File: /home/website/public_html/Forum/Sources/shop/items/Food.phpLine: 83 any ideas what i can do to fix this please?..
Greetings, great mod for the shop you made here, works great. The only problem I'm having is on the Pet Leaderboard, when you click on someone's pet there it tries to go to ?action=profile;u=2;sa=showPets but not on the forum's page. It tries to go to http://sandbox.nomicville.com/index.php?action=profile;u=2;sa=showPets instead of my website.. Any fix for this?
I get this error at the Show Pets function in the profile:Fatal error: Call to undefined function showPets() in /home/simmarcu/public_html/Sources/Profile.php on line 403Everything else works fine.
Quote from: Ace1564 on September 04, 2008, 04:39:22 amI found it.. nevermind... but i do have errorsafter buying pet food and trying to feed my pet i get this errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' happy = happy + WHERE pet_id = 3 AND ownerid = 5' at line 1File: /home/website/public_html/Forum/Sources/shop/items/Food.phpLine: 83 any ideas what i can do to fix this please?..I'm also getting this error. Any ideas? Before my pet starves to death!!
Quote from: Nascar on August 17, 2008, 04:51:40 pmI get this error at the Show Pets function in the profile:Fatal error: Call to undefined function showPets() in /home/simmarcu/public_html/Sources/Profile.php on line 403Everything else works fine.
I installed this mod manually, so maybe I missed a edit that is cousing this error.
function check_Pets() { global $db_prefix, $sourcedir, $modSettings; $date = date('z'); if ($modSettings['shop_pets_date'] != $date) { $diff = $date - $modSettings['shop_pets_date']; if ($diff < 0) { $diff = $diff + 365; } require($sourcedir . '/shop/pet_engine.php'); if ($handle = opendir($sourcedir . "/shop/pets_breeds/")) { while (false !== ($file = readdir($handle))) { if (substr($file, -4) == '.php') { // Get the breed name (file name without .php extension) require($sourcedir . '/shop/pets_breeds/' . $file); } } } $result = db_query("SELECT * FROM {$db_prefix}shop_pets", __FILE__, __LINE__); while ($row = mysql_fetch_assoc($result)) { eval('$temp = new pet_' . $row['breed'] . ';'); $temp->load_values($row['pet_id']); for ($i = 0; $i < $diff; $i++) { $temp->advance_day(); } $temp->store_values(); } $result = db_query("UPDATE {$db_prefix}settings SET value = {$date} WHERE variable = 'shop_pets_date'", __FILE__, __LINE__); } } //Loads the pets up!function load_pets() { global $sourcedir; require($sourcedir . '/shop/pet_engine.php'); if ($handle = opendir($sourcedir . "/shop/pets_breeds/")) { while (false !== ($file = readdir($handle))) { if (substr($file, -4) == '.php') { // Get the name (file name without .php extension) $name = basename($file, '.php'); require($sourcedir . '/shop/pets_breeds/' . $file); } } }}
//BEGIN SMFShop Pets Mod function template_showPets() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo ' <table border="0" width="85%" cellspacing="1" cellpadding="4" class="bordercolor" align="center"> <tr class="titlebg"> <td colspan="3" height="26"> <img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" /> ', $txt['profile_show_pets_2'], ' </td> </tr>'; // Only show pets if they have some! if (!empty($context['pets'])) { echo '</table>'; // For every pet, shows the pet! foreach ($context['pets'] as $pet) { echo $pet->view_Pet(); } } // No posts? Just end the table with a informative message. else echo ' <tr class="windowbg2"> <td> This member has no pets! </td> </tr> </table>'; } //END SMFShop Pets Mod
I can change pet pic when it level up?