Re: [CODE] Sedit.c/genshp.c errors

From: Torgny Bjers (tb@sbbs.se)
Date: 08/30/00


No no no no nonono...

Not THAT simple of an error. ;) Already gone past that stage millenia ago.

The error: Sedit reads all shops except the one with the highest rnum, hmm,
must be a counter error here somewhere...

Ok, here's an uneducated guess and also, a lamer (mailer) fix:

THE ORGINAL GENSHP.C int real_shop
-----snip-----------------------------
int real_shop(int vshop_num)
{
  int rshop_num;

  for (rshop_num = 0; rshop_num <= top_shop - top_shop_offset; rshop_num++)
    if (SHOP_NUM(rshop_num) == vshop_num)
      return rshop_num;

  return NOWHERE;
}
-----snip-----------------------------

MY MAILER VERSION OF THE int real_shop
-----snip-----------------------------
int real_shop(int vshop_num)
{
  int rshop_num;

  for (rshop_num = 0; rshop_num <= top_shop - (top_shop_offset - 1);
rshop_num++)
    if (SHOP_NUM(rshop_num) == vshop_num)
      return rshop_num;

  return NOWHERE;
}
-----snip-----------------------------

All I did was remove one from the top_shop_offset which was 1, when I looked
(I didn't look until now, the idiot I am) so... change top_shop -
top_shop_offset to just top_shop, perhaps makes it work?

Regards,
/Torgny

----- Original Message -----
From: "russ brown" <russelltbrown@netzero.net>
To: <CIRCLE@POST.QUEENSU.CA>
Sent: onsdag, 30 augusti 2000 21:52
Subject: Re: [CIRCLE] [CODE] Sedit.c/genshp.c errors


> -----Original Message-----
> From: Torgny Bjers <tb@sbbs.se>
> To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
> Date: Wednesday, August 30, 2000 11:38 AM
> Subject: [CIRCLE] [CODE] Sedit.c/genshp.c errors
>
>
> <snip>
>
> >I create a shop in sedit, save it internally, it works just fine. Save it
> to
> >disk, works as far as saving it down properly. Then, I reboot. Kaboom.
> >Fubar. It reads the shops ok as far as the actual game play goes, but
sedit
> >cannot find the shops anymore.
>
>
> Do you mean that you cannot edit any shops after the reboot, or that you
> cannot
> edit the new ones that you just created?  If it is only the new shops,
check
> the index
> file in your .../world/shp directory to make sure you are loading all your
> shops files.
> This of course assumes that the shops you added were in a zone that
> previously had
> none.
>
> Russ Brown
>
>
> _______________________________________________
> Why pay for something you could get for free?
> NetZero provides FREE Internet Access and Email
> http://www.netzero.net/download/index.html
>
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
>      +------------------------------------------------------------+


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



This archive was generated by hypermail 2b30 : 04/11/01 PDT