From: Melissa (
Date: 03/22/95

This is prolly classified as a dumb newbie question, so feel free to flame...

Below is an excerpt from shop.c It's the part that lists items and their cost
with my new coin types added in. My question is, if platinum is equal to 0,
how can I not display that? 
Kinda looks stupid as: sleeves 0 0 1 9, should be: sleeves    1 9

sprintf(buf2, "%-30s &+W%6d &+Y%6d &+W%6d &+y%6d\n\r&+w", buf3, 
        buy_price_platinum(obj, shop_nr), buy_price_gold(obj, shop_nr), 
        buy_price_silver(obj, shop_nr), buy_price_copper(obj, shop_nr))
My best guess is to do something like 
    if (!buy_price_platinum(obj, shop_nr))
       buy_price_platinum(obj, shop_nr) = NULL;
but I'm not sure if %d chokes on displaying NULL, and I really don't want to
smell smoke coming out of the old '386 tonight...

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