Hi folks.
I am trying to implement a snippet that changes the money system to use silver and copper as well as gold. I'm sure I cut and pasted everything just as instructed, but when I compile I get this error:
In act_obj.c in function do_auction
Too few arguments in function show_list_to_char
The error shows line 2779, which I have noted below. The entire old do_auction function was
replaced by a new do_auction from the snippet, and this is a segment surrounding the area in
question. Can anyone see what is wrong?
case ITEM_ARMOR:
sprintf( buf, "Armor class is %d.\n\r", obj->value[0] );
send_to_char( buf, ch );
break;
}
for ( paf = obj->pIndexData->first_affect; paf; paf = paf->next )
showaffect( ch, paf );
for ( paf = obj->first_affect; paf; paf = paf->next )
showaffect( ch, paf );
if ( ( obj->item_type == ITEM_CONTAINER || obj->item_type == ITEM_KEYRING
|| obj->item_type == ITEM_QUIVER) && obj->first_content )
{
set_char_color( AT_OBJECT, ch );
send_to_char( "Contents:\n\r", ch );
line 2779: show_list_to_char( obj->first_content, ch, TRUE, FALSE );
}
if (IS_IMMORTAL(ch))
{
sprintf(buf, "Seller: %s. Bidder: %s. Round: %d.\n\r",
auction->seller->name, auction->buyer->name,
(auction->going + 1));
send_to_char(buf, ch);
sprintf(buf, "Time left in round: %d.\n\r", auction->pulse);
send_to_char(buf, ch);
}
return;
I looked at the top of the file, where show_list_to_char is declared. It looks like:
void show_list_to_char args( ( OBJ_DATA *list, CHAR_DATA *ch, bool fShort, bool fShowNothing,
const int iDefaultAction ));
Here is the beginning of the do_auction function:
/* put items up for auction */
void do_auction (CHAR_DATA *ch, char *argument)
{
OBJ_DATA *obj;
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char arg3[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
int i;
int gbid = 0;
int sbid = 0;
int cbid = 0;
int tmpvalue = 0;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
argument = one_argument (argument, arg3);
Thanks for any help in advance,
Gadush |