Snippet Request: display shopkeeper name/vnum in list_shops() in oasis_list.c

  • zusuk
  • zusuk's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
3 years 1 week ago #5415 by zusuk
Snippet Request: display shopkeeper name/vnum in list_shops() in oasis_list.c

Anyone able to whip this up quick like? :p

This is what I tried:
      send_to_char(ch, "%s%4d%s) [%s%-5d%s] [%s%-5d%s] %s%s",
                   QGRN, counter, QNRM, QGRN, SHOP_NUM(i), QNRM, QGRN, i + 1, QNRM,
                   mob_proto[SHOP_KEEPER(i)].player.short_descr, QNRM);

But that doesn't seem to work, it's causing crashes in some of my zones.

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

  • zusuk
  • zusuk's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
3 years 1 week ago #5416 by zusuk
Ahhh nevermind, I tested this and it seems to work fine now, so this is now a snippet submission :P
      send_to_char(ch, "%s%4d%s) [%s%-5d%s] [%s%-5d%s] %s%s",
              QGRN, counter, QNRM, QGRN, SHOP_NUM(i), QNRM, QGRN, i + 1, QNRM ,
              (SHOP_KEEPER(i) < top_of_mobt) ?
                mob_proto[SHOP_KEEPER(i)].player.short_descr : "ERR!", QNRM);

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
3 years 1 week ago #5417 by Liko

zusuk wrote: Ahhh nevermind, I tested this and it seems to work fine now, so this is now a snippet submission :P

      send_to_char(ch, "%s%4d%s) [%s%-5d%s] [%s%-5d%s] %s%s",
              QGRN, counter, QNRM, QGRN, SHOP_NUM(i), QNRM, QGRN, i + 1, QNRM ,
              (SHOP_KEEPER(i) < top_of_mobt) ?
                mob_proto[SHOP_KEEPER(i)].player.short_descr : "ERR!", QNRM);


You should still be credited for the fix tho. It could be crashing others. :)

DragonBall: Tournament (1.2.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

Time to create page: 1.060 seconds