Please check out Northern Vampire Mysteries !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Need help with races Mon Nov 10, 2003 [7:59 PM]
Paul109
Email not supplied
member since: Nov 10, 2003
Reply
I am having trouble after compiling when I add races. I got the code for races from www.circlemud.org (to lazy to do it myself). Whenever I type who it only shows the correct race for the first 5 races(the ones that were on the code originally) but for the one's I added it just shows human. Can anyone help me out with this or have information regarding this?


2. RE: Need help with races Tue Nov 11, 2003 [8:58 AM]
Turandaman
ATT_Turan@hotmail.com
member since: Jun 11, 2003
In Reply To
Reply
It's always a good idea to include such basic information as what codebase you're using when you ask code questions - one can presume circlemud since that's the site you got your snippet from, but that's not necessarily the case, and if so, what version? Anyhow...check out your who function, a likely candidate for something like this would be a switch statement for the other person's race, e.g.
switch (och->race)
{
default: buffer="Human"; break;
case 1: buffer="Elf"; break;
case 2: buffer="Dwarf"; break;
}
etc. If this is the case, you just need to add your new races into that statement, or, better yet, add the information to a class table for easier reference...there are other possibilities, the MUD could use a function to retrieve the characer's race and could have a MAX_RACE limiter that you didn't change. Give more info.
If at first you don't succeed:
(A)bort, (R)etry or (F)ail?


3. RE: Need help with races Tue Nov 11, 2003 [1:14 PM]
Paul109
pwalbert@ptd.net
member since: Nov 10, 2003
In Reply To
Reply
It is circlemud ver 3.0. my who function looks fine. Upon closer inspection it seams my whole race system is bugged. I added flags for shops and anti_xx and I got compiler errors for them too. I can't seem to find the problem. I have all the switch statements I need as well.


4. RE: Need help with races Thu Nov 13, 2003 [3:17 AM]
welcor
Email not supplied
member since: Mar 9, 2000
In Reply To
Reply
grep -n "Elf" *.c

should give you a list of places where you need to add your 'new' races' names. (I think you should be looking in constants.c and/or class.c).

grep -n "ELF" *.[ch]

should give you a list of places where you add bitvectors, special handling, etc. (structs.h, handler.c, utils.h).

Welcor




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]