DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • November 19, 2018, 04:16:34 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: OK, Why Are My Stats Showing In Someone Else's Bio? (SOLVED - Thanks!)  (Read 118 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Codemeister
****
Offline Offline

Posts: 478


View Profile
« on: November 13, 2018, 09:30:52 AM »

OK...so I am confused.  I have a module I made...and the biostats are not working right...when I view someone ELSE'S bio...it shows MY stat in their biostats...instead of their stat.

Now...I tied to model after the biostats from Dycedarg's Academy...because this works...you do NOT see your stat in their bio, but you do see it in your own.

Here is my code
Code:
case "biostat":
$birdtrain = get_module_pref("birdtrain","aviary",$args['acctid']);
if ($birdtrain < 1 ) { ///we don't have a bird, nothing further needed
break;
}
if ($birdtrain > 0 && $birdtrain < 10) { //non-phoenix birds
$birdname = get_module_pref("birdname");
output("`^Avian Companion: %s`n",$birdname);
break;
}
if ($birdtrain == 10) { //phoenix handled separate due to grammatical issues with allowing the naming of phoenixes
$birdname = get_module_pref("birdname");
if ($birdname == "`\$Ph`^oen`Qix") {
$naming = 0;
} else {
$birdtitle = "`Qthe `\$Ph`^oen`Qix";
$naming = 1;
}
if ($naming == 0) {
output("`^Avian Companion: %s`n",$birdname);
} else if ($naming == 1) {
output("`^Avian Companion: %s, %s`n",$birdname,$birdtitle);
}
}
break; //this breaks phoenix birds, all other birds and no bird break above.

I am not understanding why this is not working in my module, but it does work elsewhere.  Why am I seeing MY stat...when I view someone else's bio?
It has to be something small I am not seeing, but I do not know what it is I am missing...
« Last Edit: November 13, 2018, 10:36:54 PM by TGTarheel » Logged
Anharat
Codemeister
****
Offline Offline

Posts: 275



View Profile
« Reply #1 on: November 13, 2018, 11:00:34 AM »

Check which parameters can be passed to get_module_pref and how you use them when getting "birdtrain" and "birdname". You'll figure it out.
Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1906


You're welcome.


View Profile WWW
« Reply #2 on: November 13, 2018, 03:18:09 PM »

Check which parameters can be passed to get_module_pref and how you use them when getting "birdtrain" and "birdname". You'll figure it out.

Yep, saw it straight away. Just because one is in another's bio, does not mean one is getting the right person's pref.
Logged

TGTarheel
Codemeister
****
Offline Offline

Posts: 478


View Profile
« Reply #3 on: November 13, 2018, 10:12:52 PM »

Not sure I AM figuring it out.

The $args['acctid'] was meant to make it pull the pref for the acct id being viewed, regardless of who is viewing.  Yet it seems to pull the pref for the player viewing...regardless of who is being viewed.

What am I actually missing here?

OY VEY!!

***Slaps forehead***

I think I DO see it now...

OMG am I stupid.  I don't have the $args['acctid'] on the other prefs being fetched!!

I did that and now it works.

Thanks, guys.
You at least made me look...but then I figured it out on my own...but probably would not have figured it out without that nudge from Anharat...

This module is one that replaces Fairy Dragons...with a series of birds of prey that you can train...and then turn in for better birds...until you finally get the Phoenix.  Quite difficult, actually, and tons of fun.
You actually have to train 30 birds before you can get the Phoenix...there's nine birds before the Phoenix, and you have to train a certain number of each one before you can advance to the next one.

It does depend on the Item System, though, the way I have this thing coded.  Technically, you could run the Fairy Dragons with this...but I coded it for my site with the intent that it replace the Fairy Dragons.
« Last Edit: November 13, 2018, 10:35:51 PM by TGTarheel » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

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