Thread: Race Restring
View Single Post
Old 01-08-2003, 12:57 AM   #7
Yuki
Member
 
Join Date: Jun 2002
Location: My laptop, my apt, Columbus, Ohio, USA
Posts: 42
Yuki is on a distinguished road
Send a message via ICQ to Yuki
do_who I'm sure goes something like this:

sprintf(buf, "[%13s] %s%s", ...)

or something like that. Of course, my do_who code is far-modified, so what you do is find the thing that is producing the string in the brackets, and change it.

I can't remember what the name of it was, but I recall it being something like class or something, it's been years.

Anyhow, it's what all the immortal titles are set to, so find that, then at the end where it is being added in... say the name of the variable is whoString... and your raceString is called raceString...

put something akin to this right into the code...

raceString == NULL || raceString[0] = '\0' ? ch->pcdata->raceString : whoString

If that makes no sense to you, you shouldn't be coding yet. Grab a book on C++, read the first 4-5 chapters, don't bother reading about classes (stop right before it) then go back to mud coding. Get a book for reference. There's a snippet for this out there too, I'm sure. Kyndig.org I think has tons of snippets.

I can't actually code it for you without looking at the stock rom code, which I really don't want to do...

as for recycle.c, whenever you add in a string you should free the memory for it.
Yuki is offline   Reply With Quote