Question on arg format after bitvector_t change in genshp.c

From: Mathew Earle Reuther (graymere@zipcon.net)
Date: 07/11/02


Here's the save code from genshp.c:

      fprintf(shop_file,
              "%s~\n%s~\n%s~\n%s~\n%s~\n%s~\n%s~\n"
              "%d\n%ld\n%d\n%d\n",
              S_NOITEM1(shop) ? S_NOITEM1(shop) : "%s Ke?!",
              S_NOITEM2(shop) ? S_NOITEM2(shop) : "%s Ke?!",
              S_NOBUY(shop) ? S_NOBUY(shop) : "%s Ke?!",
              S_NOCASH1(shop) ? S_NOCASH1(shop) : "%s Ke?!",
              S_NOCASH2(shop) ? S_NOCASH2(shop) : "%s Ke?!",
              S_BUY(shop) ? S_BUY(shop) : "%s Ke?! %d?",
              S_SELL(shop) ? S_SELL(shop) : "%s Ke?! %d?",
              S_BROKE_TEMPER(shop),
              S_BITVECTOR(shop),
              mob_index[S_KEEPER(shop)].vnum,
              S_NOTRADE(shop)
              );

I'm getting this compile warning:

genshp.c: In function `save_shops':
genshp.c:484: warning: long int format, different type arg (arg 11)

Now, near as I can tell, there is an issue with how the S_NOTRADE(shop)
will be written out.  It does seem this is in fact the case.  I can edit
a shop, but if I then reboot, the shop is messed up.  The shopkeeper field
is screwed up somewhere (though that COULD be from me messing with the
asciiflag conv I suppose) and always returns NO shopkeeper.  The changes
I've made could have messed my files up to the point which they're unable
to function until I re-write them, but I think there's more of an issue
with how things are being saved out.

When I relaod there are also numerous notrade bits set, when there are
NONE when I save the shop in OLC.

Does anyone have any insight into this?

-Mathew

--
   +---------------------------------------------------------------+
   | 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