[NEWBIE] Clan.txt patch

From: Kevin (geosly@DCN.DAVIS.CA.US)
Date: 04/17/98


In a patch I found I'm having a slight problem. I've clipped the part that
is troubling me:

----SNIP-----
void do_clan_info (struct char_data *ch, char *arg)
{
int i=0,j;
int k=1;

if(num_of_clans == 0) {
  send_to_char("No clans have formed yet.\r\n",ch);
  return; }

if(!(*arg)) {

        sprintf(buf,"%sClan
Info%s\r\n------------------------------------------------------------------
----------\r\n",CCMAG(ch,C_NRM),CCNRM(ch,C_NRM));
  for(i=0; i < num_of_clans; i++)
    sprintf(buf, "%s%s[%-3d]%s  %-20s %sMembers:%s %3d  %sPower:%s %5d
%sAppfee:%s %d\r\n",
                        buf , CCLBL(ch,C_NRM), k, CCYEL(ch,C_NRM), clan[i].name,
                        CCGRN(ch,C_NRM), CCNRM(ch,C_NRM), clan[i].members,
CCGRN(ch,C_NRM),
           CCNRM(ch,C_NRM), clan[i].power, CCGRN(ch,C_NRM),
CCNRM(ch,C_NRM), clan[i].app_fee);
        page_string(ch->desc,buf, 1);
  return;
  }
else
  if ((i = find_clan(arg)) < 0) {
    send_to_char("Unknown clan.\r\n", ch);
    return; }
-----------END SNIP---

What is happening is the clan id number is doubling, and it isn't starting
with 0. I created 2 test clans and typed: clan info and this is the result:

Clan Info
----------------------------------------------------------------------------
[1  ]  clan             Members:   0  Power:     0  Appfee: 0
[1  ]  Test             Members:   1  Power:     1  Appfee: 0

Any suggestions? Please :)
-Kevin


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST