DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • October 22, 2017, 03:46:56 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: My Stables are broken, please help  (Read 2912 times)
0 Members and 1 Guest are viewing this topic.
drake2k
Guest
« on: April 29, 2004, 12:22:09 PM »

the only modification I made to the stable.php was prefixis in my sql query but everything worked fine then.  I've reloaded the original stable.php to no avail.

what happens is, you can buy and sell a mount.  However when you go to sell a mount, merrick offers ZERO gold (which is normal) and ZERO gems (which is not normal).  You can sell your mount for ZERO!  He takes the mount just fine and then you can buy a new one.  He will not give you or offer you any gems

in the mounts table the amount of the mount is specified just fine.

any suggestions?



---edit---
I also noticed today that I can't go to the dark horse tavern in the forest anymore via the horse.  Any help would be most greatful.
« Last Edit: April 29, 2004, 12:36:48 PM by drake2k » Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5475



View Profile WWW
« Reply #1 on: April 29, 2004, 12:23:41 PM »

A link to your website (if your source is viewable), or your stables.php file would be most helpful...
Logged

Play the latest beta version here on DragonPrime
drake2k
Guest
« Reply #2 on: April 29, 2004, 12:37:33 PM »

A link to your website (if your source is viewable), or your stables.php file would be most helpful...

Sorry, guess that would help.  The link is http://www.grinbox.com but the source is not viewable.  I've edited the first message in this thread and added the stables.php in the zip file.


For the record....
I LOVE the Chrono Trigger and Breath of Fire avatars I see floating around.
« Last Edit: April 29, 2004, 12:40:25 PM by drake2k » Logged
drake2k
Guest
« Reply #3 on: April 29, 2004, 03:07:21 PM »

Also found.... When you buy a horse, and the new day comes...the horse runs away.  IOW it's not there anymoe.  *sob*
Logged
drake2k
Guest
« Reply #4 on: May 03, 2004, 08:23:10 AM »

bump... Please, any ideas what to look for?
Logged
Voratus
Guest
« Reply #5 on: May 03, 2004, 10:00:17 AM »

It sounds to me that somewhere the $playermount array isn't getting the correct information.
You might want to check out your common.php and make sure that the following is correct in there
Code:
function getmount($horse=0) {
   $sql = "SELECT * FROM mounts WHERE mountid='$horse'";
   $result = db_query($sql);
   if (db_num_rows($result)>0){
      return db_fetch_assoc($result);
   }else{
      return array();
   }
}
If you were messing around with database prefixes, it might have broken that function.
Logged
drake2k
Guest
« Reply #6 on: May 03, 2004, 11:43:37 AM »

Mine is as follows
Code:
function getmount($horse=0) {
   global $DB_PREF, $horse;
   $sql = "SELECT * FROM ${"DB_PREF"}mounts WHERE mountid='$horse'";
   $result = db_query($sql);
   if (db_num_rows($result)>0){
      return db_fetch_assoc($result);
   }else{
      return array();
   }
}

I added the global $DB_PREF because that's part of my prefix mod, the problem did not start until long after I've been using this mode.  The global $horse was already there but I see no need for it since it's passed from the function getmount($horse) -  Other than that it all looks the same.  Any other suggestions?
Logged
Voratus
Guest
« Reply #7 on: May 03, 2004, 02:12:07 PM »

I'd say next would be to verify that the variables are getting the correct information. When I have a problem with code, I'll through in some debugging outputs.
For example, dealing with the stable, I'd throw in something to output all the player's mount's current information, and compare it to what should be there.
If you have something that displays the mount resell as correct, yet when you sell it you don't get that amount, it can help narrow down where to look.
Logged
drake2k
Guest
« Reply #8 on: May 03, 2004, 05:02:19 PM »

I don't know what I did to screw it up, but I fixed it.  I replaced my common.php (so that tells me it was a problem with the functions) with a fresh new copy.  Re-did a few modes and presto it's working again.

This didn't start until I tried to use the igm thing. I think I'll stay away from it and add my own mods as I see fit.  Thanx for all the help.

As props and not suck up,  I want to say that Dragonprime is wonderful. I'm glad it's here and am greatful for all the help I get from the participants as well as the moderators/admins.  Kudos!!

[/glow]
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
17 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search