line 35 through 65
void do_account (CHAR_DATA *ch, char *argument)
{
long gold = 0, silver = 0,
shares = 0;
int diff, bonus = 0;
char buf[MAX_STRING_LENGTH];
char const *class = class_table[ch->class].name;
gold = ch->pcdata->gold_bank;
silver = ch->pcdata->silver_bank;
shares = ch->pcdata->shares;
diff = (SHARE_MAX - ch->pcdata->shares_bought);
if( ch->pcdata->shares / SHARES != 0)
bonus = shares / SHARES;
ch->pcdata->duration = bonus;
/* No NPC's, No pets, No imms,
* No chainmail, No service!
*/
if( (IS_NPC(ch) || IS_SET(ch->act, ACT_PET)
|| (ch->level > LEVEL_HERO ))
{
send_to_char("Only players need money!\n\r",
ch);
return;
}
if(!str_cmp(class, "thief"))
{
sprintf( buf,"Your guild's fence tells
you.\n\rYou have in your beltpouch:\n\r"
" Gold: %10ld\n\r Silver:
%10ld\n\r"
"Under your bedroll:\n\r"
" Gold: %10ld\n\r Silver:
%10ld\n\r",ch->gold, ch->silver,gold, silver);
}
--- Jason Gauthier <[EMAIL PROTECTED]> wrote:
>
> Start with line 55 and find out what the problem is.
> With C a simple typo could cause a few hundred error
> messages.
> It's important to start at the top, and figure out
> the first one. They'll
> get drastically
> smaller as you solve them.
>
> However, we can't help you without seeing code.
> So, let's see what's around line 55.
>
> >
> > bank.c: In function `do_account':
> > bank.c:55: parse error before `{'
> > bank.c:40: warning: unused variable `class'
> > bank.c:39: warning: unused variable `buf'
> > bank.c: At top level:
> > bank.c:59: parse error before `if'
> > bank.c:73: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:73: warning: parameter names (without
> types) in
> > function declaration
> > bank.c:73: conflicting types for `send_to_char'
> > merc.h:2417: previous declaration of
> `send_to_char'
> > bank.c:73: warning: data definition has no type or
> > storage class
> > bank.c:74: parse error before `if'
> > bank.c:77: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:77: warning: parameter names (without
> types) in
> > function declaration
> > bank.c:77: warning: data definition has no type or
> > storage class
> > bank.c:78: parse error before string constant
> > bank.c:78: warning: type defaults to `int' in
> > declaration of `sprintf'
> > bank.c:78: warning: data definition has no type or
> > storage class
> > bank.c:79: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:79: warning: parameter names (without
> types) in
> > function declaration
> > bank.c:79: warning: data definition has no type or
> > storage class
> > bank.c:80: parse error before `}'
> > bank.c: In function `do_deposit':
> > bank.c:98: parse error before `{'
> > bank.c:91: warning: unused variable `buf'
> > bank.c:90: warning: unused variable `arg2'
> > bank.c:89: warning: unused variable `arg1'
> > bank.c:88: warning: unused variable `class'
> > bank.c:87: warning: unused variable `amount'
> > bank.c: At top level:
> > bank.c:102: parse error before `if'
> > bank.c:117: warning: type defaults to `int' in
> > declaration of `argument'
> > bank.c:117: `arg2' undeclared here (not in a
> function)
> > bank.c:117: warning: passing arg 1 of
> `one_argument'
> > makes pointer from intege
> > without a cast
> > bank.c:117: warning: initialization makes integer
> from
> > pointer without a cast
> > bank.c:117: initializer element is not constant
> > bank.c:117: warning: data definition has no type
> or
> > storage class
> > bank.c:118: parse error before `if'
> > bank.c:124: parse error before string constant
> > bank.c:124: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:124: warning: data definition has no type
> or
> > storage class
> > bank.c:129: parse error before string constant
> > bank.c:129: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:129: warning: data definition has no type
> or
> > storage class
> > bank.c:131: parse error before string constant
> > bank.c:131: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:131: warning: data definition has no type
> or
> > storage class
> > bank.c:139: parse error before string constant
> > bank.c:139: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:139: warning: data definition has no type
> or
> > storage class
> > bank.c:151: parse error before string constant
> > bank.c:151: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:151: warning: data definition has no type
> or
> > storage class
> > bank.c:165: parse error before `('
> > bank.c:165: warning: type defaults to `int' in
> > declaration of `act_new'
> > bank.c:165: conflicting types for `act_new'
> > merc.h:2423: previous declaration of `act_new'
> > bank.c:165: warning: type defaults to `int' in
> > declaration of `ch'
> > bank.c:165: parse error before `void'
> > bank.c:166: parse error before string constant
> > bank.c:167: warning: type defaults to `int' in
> > declaration of `sprintf'
> > bank.c:167: warning: data definition has no type
> or
> > storage class
> > bank.c:168: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:168: warning: parameter names (without
> types)
> > in function declaration
> > bank.c:168: warning: data definition has no type
> or
> > storage class
> > bank.c:169: parse error before `return'
> > bank.c:183: parse error before `('
> > bank.c:183: warning: type defaults to `int' in
> > declaration of `act_new'
> > bank.c:183: warning: type defaults to `int' in
> > declaration of `ch'
> > bank.c:183: parse error before `void'
> > bank.c:184: parse error before string constant
> > bank.c:184: warning: type defaults to `int' in
> > declaration of `sprintf'
> > bank.c:184: warning: data definition has no type
> or
> > storage class
> > bank.c:185: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:185: warning: parameter names (without
> types)
> > in function declaration
> > bank.c:185: warning: data definition has no type
> or
> > storage class
> > bank.c:186: parse error before `return'
> > bank.c:197: parse error before string constant
> > bank.c:197: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:197: warning: data definition has no type
> or
> > storage class
> > bank.c:209: parse error before string constant
> > bank.c:209: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:209: warning: data definition has no type
> or
> > storage class
> > bank.c:223: parse error before `('
> > bank.c:223: warning: type defaults to `int' in
> > declaration of `act_new'
> > bank.c:223: warning: type defaults to `int' in
> > declaration of `ch'
> > bank.c:223: parse error before `void'
> > bank.c:224: parse error before string constant
> > bank.c:224: warning: type defaults to `int' in
> > declaration of `sprintf'
> > bank.c:224: warning: data definition has no type
> or
> > storage class
> > bank.c:225: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:225: warning: parameter names (without
> types)
> > in function declaration
> > bank.c:225: warning: data definition has no type
> or
> > storage class
> > bank.c:226: parse error before `return'
> > bank.c:240: parse error before `('
> > bank.c:240: warning: type defaults to `int' in
> > declaration of `act_new'
> > bank.c:240: warning: type defaults to `int' in
> > declaration of `ch'
> > bank.c:240: parse error before `void'
> > bank.c:241: parse error before string constant
> > bank.c:241: warning: type defaults to `int' in
> > declaration of `sprintf'
> > bank.c:241: warning: data definition has no type
> or
> > storage class
> > bank.c:242: warning: type defaults to `int' in
> > declaration of `send_to_char'
> > bank.c:242: warning: parameter names (without
> types)
> > in function declaration
> > bank.c:242: warning: data definition has no type
> or
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/