DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • February 28, 2017, 12:08:56 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages
IRC Channels

Pages: [1]   Go Down
Author Topic: Question concerning new races  (Read 3651 times)
0 Members and 1 Guest are viewing this topic.
« on: March 10, 2004, 10:55:16 PM »

I've added quite a few new races into my server, which they all work perfect (well near perfect =P). The only problem is.. they dont display when checking bio.php, it's just blank.
They display in vital info and everything just fine, and in common i have
 $races=array(1=>"Troll",2=>"Elf",3=>"Human",4=>"Dwarf",5=>"Imp", etc etc

Which i assumed both bio.php and vital info are running the race display off that. Can anyone help me out/correct me with what i'm missing?

Thanks in advance,

- pbw
« Reply #1 on: March 12, 2004, 06:48:45 AM »

Hate to bring this back up, but no one has any thoughts on what I may have overlooked?

Like I said it's not crucial or anything, as the races do display in vitals for people. Just not in bio.php *assumed both displayed via the same line in common* Oh yeah forgot to mention.. The original races display fine, it's just not all the ones I have since added in.

If not, I suppose I can just set an array in bio.php.

Thanks guys,

- pbw
« Reply #2 on: March 12, 2004, 09:58:54 AM »

I'm not sure what you're talking about with "vital info" if that's different from the bio.

Bio.php does pull the race array from common.php, so I'd say to verify the syntax there.

I've added an additional race, and it displays fine on the bio screen. Maybe doublecheck the rest of your files, and make sure that you didn't put a value for "races" elsewhere (easy to do in Dreamweaver by searching for all instances of "races")
Remember, race is the number for the race, and races is the array of race names.
Also doublecheck you have an entry in your array for each race number.
« Reply #3 on: March 12, 2004, 12:49:22 PM »

I have a little system called the Race Array that I use in everything. Where ever I see this problem, I replace the old race-array with my own that I keep handy for a cut and paste sort of situation.

« Reply #4 on: March 12, 2004, 02:04:53 PM »

Thanks for you help guys, yeah, makes no sense to me. race array looks correct as far as i can tell. So i'll just do what you suggested strider, no biggie. Just was curious if i maybe overlooked something obvious. But it seems i havent


- pbw
Mod God
Offline Offline

Posts: 1916

View Profile WWW
« Reply #5 on: March 12, 2004, 04:17:27 PM »

same issue here.  just added new classes and specials, and both are blank in bio...  will update if i find out what the problem is

these are the lines being read from bio right?

function increment_specialty(){
  global $session;
        if ($session[user][specialty]>0){
            $skillnames = array(1=>"Dark Arts","Mystical Powers","Thievery","Seduction","Tactics","Rock Skin","Rhetoric","Muscles","Nature","Weather");
            $skills = array(1=>"darkarts","magic","thievery","mystic","tactic","rockskin","rhetoric","muscle","nature","weather");
            $skillpoints = array(1=>"darkartuses","magicuses","thieveryuses","mysticuses","tacticuses","rockskinuses","rhetoricuses","muscleuses","natureuses","weatheruses");

« Last Edit: March 12, 2004, 04:27:47 PM by sixf00t4 » Logged

« Reply #6 on: March 12, 2004, 04:40:51 PM »

in bio.php, For classes look for:

$specialty=array(0=>"Unspecified","Dark Arts","Mystical Powers","Thieving Skills");

and edit accordingly. I just made an array for races as well.. not the best way, but works fine.

hope that helps,

- pbw
« Last Edit: March 12, 2004, 04:41:57 PM by Peanut_Butter_Wolf » Logged
Mod God
Offline Offline

Posts: 1916

View Profile WWW
« Reply #7 on: March 12, 2004, 04:49:57 PM »

take out the single quotes around race  Cool

« Reply #8 on: March 12, 2004, 05:01:23 PM »

Here's my Bio.php for you to checkout. . . This also has the extra class that I have available on my server and a BUNCH of races:

require_once "common.php";
$result = db_query("SELECT login,name,level,sex,title,specialty,hashorse,acctid,resurrections,bio,quests,cursed,mana,dragonkills,race FROM accounts WHERE login='$_GET[char]'");
$row = db_fetch_assoc($result);
$row[login] = rawurlencode($row[login]);

page_header("Character Biography: ".preg_replace("'[`].'","",$row[name]));
$specialty=array(0=>"Unspecified","Dark Arts","Mystical Powers","Thieving Skills","Death Knight");
output("`^Biography for $row[name]");
if ($session[user][loggedin]) output("<a href=\"mail.php?op=write&to=$row[login]\" target=\"_blank\" onClick=\"".popup("mail.php?op=write&to=$row[login]").";return false;\"><img src='images/newscroll.GIF' width='16' height='16' alt='Write Mail' border='0'></a>",true);
output("`^Title: `@$row[title]`n");
output("`^Level: `@$row[level]`n");
output("`^Resurrections: `@$row[resurrections]`n");
output("`^Race: `@{$races[$row['race']]}`n");
output("`^Mana: `@$row[mana]`n");
output("`^Gender: `@".($row[sex]?"Female":"Male")."`n");
output("`^Specialty: `@".$specialty[$row[specialty]]."`n");

$sql = "SELECT mountname FROM mounts WHERE mountid='{$row['hashorse']}'";
$result = db_query($sql);
$mount = db_fetch_assoc($result);
if ($mount['mountname']=="")
       $mount['mountname'] = "`iNone`i";
output("`^Creature: `@{$mount['mountname']}`n`n");
if ($row['dragonkills']>0)
        output("`^Dragon Kills: `@{$row['dragonkills']} `^| ");
if ($row['quests']>0)
        output("`^Quest Points: `@{$row['quests']}`n");
if ($row['cursed']>0)
        output("`4[ `7cursed `4] `7 This Player is Cursed`n");
if ($row['bio']>"")
        output("`n`^Bio : `@".soap($row['bio'])."`n");
output("`n`^Recent accomplishments (and defeats) of $row[name]`^");
$result = db_query("SELECT * FROM news WHERE accountid=$row[acctid] ORDER BY newsdate DESC,newsid ASC LIMIT 100");
for ($i=0;$i<db_num_rows($result);$i++){
        $row = db_fetch_assoc($result);
        if ($odate!=$row[newsdate]){
                output("`n`b`@".date("D, M d",strtotime($row[newsdate]))."`b`n");

if ($_GET[ret]==""){
        addnav("Return to the warrior list","list.php");
        $return = preg_replace("'[&?]c=[[:digit:]-]+'","",$_GET[ret]);
        $return = substr($return,strrpos($return,"/")+1);
        addnav("Return whence you came",$return);


Also, you should take out the single quotes around race . . . Tongue
« Last Edit: March 12, 2004, 05:02:17 PM by strider » Logged
« Reply #9 on: March 12, 2004, 05:14:21 PM »

hrmm.. looks the same as mine (excluding your extra realm specific info)*shrugs* ah well, no biggie.. i just declared an array in bio.php called $race1, and used that instead of $races.

Works fine like that,  just kinda curious i guess as to why it read it for vital info but not for bio.php.

Thanks for your help Smiley

st00pid single quotes.

- pbw
Mod God
Offline Offline

Posts: 1916

View Profile WWW
« Reply #10 on: March 12, 2004, 05:30:10 PM »

was that a pun?  "st00pid"   seeing as my name is sixf00t4?  if it wasnt intentional, that is pretty funny.  if it was intentional, it was pretty clever Grin

Pages: [1]   Go Up
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!
Who's Online
31 Guests, 2 Users
Aeolus, Stephen.Kise
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search