Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JusPlay77

Pages: [1] 2
1
Modifications / Re: SMFPets Version 0.2
« on: March 18, 2008, 08:38:13 pm »
I am sorry to say that this mod has a long way to go, and I am discontinuing the use of it until a new version is released (if ever as it seems that most of the developers on this forum are inactive)

I had a fresh install on a new forum (only mods added were SMFShop, SMFShop Stats, SMF Pets 0.2).  Everything installed fine and looked great.. I used the original pets that came with it (no custom ones).. and was able to purchase a pet and train it. 

However, the same problems occurred that I faced on my forum:

  • Pet Cage - none of the cage scripts on this forum worked.  It would simply delete itself and not allow you to purchase more pets
  • No way of changing MAX-ALLOWED pets.
  • If a player uses any non-alpha characters in the description the following error is shown below (NOTE: This effects ALL functions of the shop)

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's hometown.',
hunger = 8,
age = 1,
training ' at line 7
File: /home/content/x/x/x/xxxxxxxxxxx/html/smf/Sources/shop/pet_engine.php
Line: 305

This is true for both forums. 

--

I hope that someone does try to develop an SMFPets Version 0.3 with the above bugs fixed.

2
Requested additions / Unlimited Pets (No Use of Cage)
« on: March 14, 2008, 02:40:20 pm »
I need my SMF Pets mod to allow unlimited amount of pets for my members, without the use of a cage.php item.  Basically I need the MAX-PERMITTED to be unlimited (or really high, like 100). 

Any ideas?

3
Modifications / Re: SMFPets Version 0.2
« on: March 11, 2008, 12:00:27 am »
Powered by SMF 1.1.4
Powered by SMFShop 3.0 (Build 12)
SMFPets Version 0.2

I had problems with it prior, so I uninstalled it, and manually installed it so I know that it was done correctly with no errors from the Package Manager. 

Scenario:  Everything is working as far as the way it should look, the permissions, and the ability to add pets to the Pet Hatchery.. Here are some screenshots:

Pet Central:
Pet Hatchery:
Pets Leaderboard:

Problem: I do not have any pets, yet when I try to purchase a pet, I get the following error:


Solution Attempts:  I tried to use a Cage (item from shop), but I get the following:


And if I click Use Item anyways, I get the following:

When I go back to my Inventory, the cage is of course gone, and when I go back to the Hatchery, I still cannot purchase a pet.




So I cant purchase pets, and I can't increase my MAX-PETS allowed.. Any solutions?

4
Bugs / 'Do' Action Bug?
« on: March 03, 2008, 09:48:15 am »
Quote
ERROR: The 'do' action you passed was not valid!

When I click on Hatchery, or Leadersboard, I get the above error

5
Bugs / Re: How do I Increase Max Pets Permitted.
« on: March 01, 2008, 08:15:13 am »
Thanks much!  That does make perfect sense (can't believe I didn't see it)

...

Dunno if it works though or not, I have another error now (which came out of nowhere)...:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's the best! Built for Battle!',
hunger = 8,
age = 1,
' at line 7
File: /home/content/x/x/x/xxxxxxx/html/smf/Sources/shop/pet_engine.php
Line: 305

Issue Found Here: [ SERIOUS ISSUE WITH pet_engine.php ]

6
Bugs / Re: [ SERIOUS ISSUES WITH pet_engine.php ]
« on: March 01, 2008, 06:48:29 am »
This is what my db looks like.. dunno if there is anything missing?  or if something extra needs to be done to it or the php code? 





If anyone knows how to fix this, please respond.- This error is affecting my entire Shop-- nothing works with this error in play

7
Bugs / [ SERIOUS ISSUES WITH pet_engine.php ]
« on: February 29, 2008, 05:36:49 pm »
SMF 1.1.4
SMF Shop Mod 3 (Build 12)
SMF Pets Version 0.2
SMFShop Inventory Post Mod  Version 0.2
SMFShop Stats Mod Version 0.1

\---------------------\

My shop all of a sudden stopped working over night.  I hadn't changed anything in the code prior (It was working, and when I came back to further train my pet I got the following error:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's the best! Built for Battle!',
hunger = 8,
age = 1,
' at line 7
File: /home/content/x/x/x/xxxxx/html/smf/Sources/shop/pet_engine.php
Line: 305

On top of that, my pet is somehow 21 days old and Very Depressed / Starving.  (I can still see my pet through my UserCP). My pet in actuality is only 2-3 days old.

I have attached the code of the pet_engine.php to this thread:

----

Furthermore, the section that it says it has a problem with is here:

Code: [Select]
290 //Store the values back into the database(very important)
291 function store_values() {
292 global $db_prefix;
293 $result = db_query("UPDATE {$db_prefix}shop_pets
294 SET name = '{$this->name}',
295     level = {$this->level},
296     curap = {$this->curap},
297     maxap = {$this->maxap},
298     happy = {$this->happy},
299     `desc` = '{$this->desc}',
300     hunger = {$this->hunger},
301     age = {$this->age},
302     training = {$this->training},
303     trainingend = '{$this->trainingend}',
304     ownerid = {$this->ownerid}
305     WHERE pet_id = {$this->id}", __FILE__, __LINE__);
306 }

Thanks in advance 

8
Bugs / Re: How do I Increase Max Pets Permitted.
« on: February 29, 2008, 08:04:51 am »
Quote
Fatal error: Cannot instantiate non-existent class: item_cage in /home/content/./././................html/smf/Sources/shop/Shop-Inventory.php(154) : eval()'d code on line 1

Got that now after the change.

9
Bugs / Re: How do I Increase Max Pets Permitted.
« on: February 29, 2008, 03:11:19 am »
That was the first thing that I tried I'm afraid.. I found another code on the forums here:

Code: [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2006 DanSoft Australia           |
|      http://www.dansoftaustralia.net/        |
\**********************************************/

class item_PetCage extends itemTemplate {
    function 
getItemDetails() {
$this->authorName "The Great Orator";
$this->authorWeb "http://www.dragontalk.net/";
$this->authorEmail "admin@dragontalk.net";

        
$this->name "Increase Pet Ownership";
        
$this->desc "Increase Number of pets owned by xxx";
        
$this->price 500;

        
$this->require_input false;
        
$this->can_use_item true;
    }
    
    
// See 'AddToPostCount.php' for info on how this works
    
function getAddInput() {
        return 
"Number of additional pets to allow: <input type='text' name='info1' value='5' />";
    }

    function 
getUseInput() {
        return 
"";
    }

    function 
onUse() {
        global 
$db_prefix$ID_MEMBER$item_info;
$MaxPets db_query("SELECT maxpets 
FROM 
{$db_prefix}members
                            WHERE ownerid = 
{$ID_MEMBER}",__FILE____LINE__);
$MaxPetsReached mysql_fetch_assoc($result);

if ($MaxPetsReached != 10){
        $result db_query("UPDATE {$db_prefix}members
                            SET maxpets = maxpets + 
{$item_info[1]}
                            WHERE ownerid = 
{$ID_MEMBER}",__FILE____LINE__);
        return "You can now own {$item_info[1]} additional pets!";
}
else{
return "You have too many pets already...."
}
    }

}

?>

But it had something wrong with line 44

10
Bugs / Re: How do I Increase Max Pets Permitted.
« on: February 29, 2008, 02:45:09 am »
It's not a script error.. It's just not saying what it's supposed too..

Quote
This item requires further input. Please complete the fields below, and then press "Use Item"
You already have too many pets to use this item. Using it will just result in item loss.

Is what comes up.  It should say:

You can now own up to X pets

11
Bugs / Re: How do I Increase Max Pets Permitted.
« on: February 29, 2008, 02:32:54 am »
Just tried that now.. didn't work :( - Thank you though for the attempt.  Hopefully this error can be figured out soon! 

12
Bugs / How do I Increase Max Pets Permitted.
« on: February 29, 2008, 01:22:51 am »
SMF 1.1.4
SMF Shop 3.0 (Build 12)

Cage.php
Code: [Select]
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007)                          $ *
* $Id:: Steal.php 79 2007-01-18 08:26:55Z daniel15                              $ *
* Software by:                DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2005-2007 by:     DanSoft Australia (http://www.dansoftaustralia.net/)*
* Support, News, Updates at:  http://www.dansoftaustralia.net/                    *
*                                                                                 *
* Forum software by:          Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version of the license can always be found at                        *
* http://www.simplemachines.org.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

class 
item_Cage extends itemTemplate
{
function getItemDetails()
{
$this->authorName 'Basilbeard';
$this->authorWeb 'www.nomicville.com';
$this->authorEmail 'basilbeard@nomicville.com';

$this->name 'Pet Cage';
$this->desc 'Increase your max pets by one!';
$this->price 500;

$this->require_input true;
$this->can_use_item true;
}

function getAddInput()
{
global $item_info$db_prefix;
return 'Max number of max pets: <input type="text" name="info1" value="' $item_info[1]  . '" /><br />';
}

function getUseInput()
{
global $db_prefix$ID_MEMBER$item_info;

$result db_query("SELECT maxpets FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
if ($row['maxpets'] >= $item_info[1]) {
return "You already have too many pets to use this item. Using it will just result in item loss.";
}
else {
return "Are you sure you want to use this item?";
}
}

function onUse()
{
global $db_prefix$ID_MEMBER$item_info;

$result db_query("SELECT maxpets FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
if ($row['maxpets'] >= $item_info[1]) {
return "Told you so!";
}
else {
$maxpets $row['maxpets'] + 1;
$result db_query("UPDATE {$db_prefix}members SET maxpets = maxpets + 1 WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
return "You can now own up to {$maxpets} pets";
}
}
}
?>


Yes, I searched and found 4 topics on the subject of cage.  I tried to change some variables around in the code several times now, and I am just completely baffled by how I am supposed to allow my members to have a maximum of 5 pets.

--

This is what happens when I try to use the item (I have 1 pet btw)...

Quote
This item requires further input. Please complete the fields below, and then press "Use Item"
You already have too many pets to use this item. Using it will just result in item loss.

And of course using the item results in it disappearing from inventory and not changing anything.

13
General SMFShop Discussion / Re: Pet Penalties
« on: February 29, 2008, 12:15:02 am »
I'd like to see where members cannot purchase the same pet twice.  (ie: if my cage would work on my forums, and it allowed members to have multiple pets.)

I wonder if it would be possible to limit members to 1 of each pet.

14
Modifications / Re: SMFPets Version 0.2
« on: February 28, 2008, 12:39:06 pm »
SMF 1.1.4
SMFPets Version 0.2

I currently own 1 pet, but when I try to buy more pets I get this error:

Quote
You are not allowed any more pets!!!

So I bought a Pet Cage, and when I try to use it I get this error:

Quote
This item requires further input. Please complete the fields below, and then press "Use Item"
You already have too many pets to use this item. Using it will just result in item loss.

I click Use Item and I then get:

Quote
Told you so!

Back to your Inventory

Then I go back to Pet Hatchery and try to buy a pet, and get this error:

Quote
You are not allowed any more pets!!!



\-----------------------------------------------\



I removed the pet cage from the shop, and re-added it to see if that would fix it.. It did not.. Any other suggestions? 

This fix is essential since there is no option to sell the pets once you bought them.  (Poison is cool, but it's a really pricey way to change pets)

15
Modifications / Re: SMFPets Version 0.2
« on: February 07, 2008, 09:53:00 am »
I get the following:

Quote
Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager.

EDIT: N/M Fixed that problem.. but now I have another one:

Quote
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Code    installScript.php    
2.    Extract Tree    ./Sources/shop/pets_breeds    
3.    Extract Tree    ./Sources/shop/pet_images    
4.    Extract Tree    ./Sources/shop/starter_pets    
5.    Extract File    ./Sources/shop/Shop-Pets.php    
6.    Extract File    ./Sources/shop/pet_engine.php    
7.    Extract File    ./Sources/shop/items/Cage.php    
8.    Extract File    ./Sources/shop/items/Food.php    
9.    Extract File    ./Themes/default/default/images/icons/pets.gif    
10.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
11.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
12.    Execute Modification    ./Themes/default/languages/ManagePermissions.english.php    Test successful
13.    Execute Modification    ./Themes/default/languages/Shop.english.php    Test successful
14.    Execute Modification    ./Themes/default/Shop.template.php    Test successful
15.    Execute Modification    ./Sources/shop/Shop.php    Test successful
16.    Execute Modification    ./Sources/shop/Shop-Subs.php    Test successful
17.    Execute Modification    ./Sources/Profile.php    Test successful
18.    Execute Modification    ./Sources/Load.php    Test failed
19.    Execute Modification    ./Themes/default/languages/index.english.php    Test successful
20.    Execute Modification    ./Themes/default/Display.template.php    Test successful

Pages: [1] 2