>char align[MAX_INPUT_LENGTH]; > >if (GET_ALIGNMENT(ch) >= 750 && !IS_NPC(ch)) > align == "Saintly"; >if (GET_ALIGNMENT(ch) <= 749 && !IS_NPC(ch)) > align == "Beatific"; >else if (GET_ALIGNMENT(ch) <= 499 && !IS_NPC(ch)) > align == "Good"; >else if (GET_ALIGNMENT(ch) <= 249 && !IS_NPC(ch)) > align == "Neutral"; >else if (GET_ALIGNMENT(ch) <= -250 && !IS_NPC(ch)) > align == "Evil"; >else if (GET_ALIGNMENT(ch) <= -500 && !IS_NPC(ch)) > align == "Diabolic"; >else //(GET_ALIGNMENT(ch) <= -750 && !IS_NPC(ch)) > align == "Demonic"; > just replace with the follow: char *align; if (!IS_NPC(ch)) { if (GET_ALIGNMENT(ch) >= 750) align = "Saintly"; else if ( etc } got it? if you put the npc check in the beginning, if its an NPC, it won't bother going through all those statements. also won't have to type so much. align must be made a pointer to use the assignment operator. you're going to strcat the align to a buffer right? why not just use strcat instead of using align? -- that is, if ur going to use strcat(buf, align) after all this... _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT