Multiple class entry who list

Posted by Txzeenath on Thu 22 Jul 2004 07:33 PM — 2 posts, 11,971 views.

USA #0
I want to add three fields to the class area of the who list..
Here's the code i've tried:

strcpy( char_name, wch->name );
if (wch->classtwo != -1 && wch->classthree != -1)
sprintf( class_text, "%s%2d %s|%s|%s", NOT_AUTHED(wch) ? "N" : " ", wch->level,
class_table[wch->class]->who_name, class_table[wch->classtwo]->who_name,
class_table[wch->classthree]->who_name );

else if (wch->classtwo != -1 && wch->classthree == -1)
sprintf( class_text, "%s%2d %s|%s|%s", NOT_AUTHED(wch) ? "N" : " ", wch->level,
class_table[wch->class]->who_name, class_table[wch->classtwo]->who_name,
class_table[wch->classthree]->who_name );

else if (wch->classtwo == -1 && wch->classthree == -1)
sprintf( class_text, "%s%2d %s|%s|%s", NOT_AUTHED(wch) ? "N" : " ", wch->level,
class_table[wch->class]->who_name );

class = class_text;



But all that does is crash when the first or second ones come out true
USA #1
Got it working.. if anyone needs to know how to list multiple classes for something like multiclass or something just ask and i'll post it