Several coding problems

Posted by Davidgan on Sun 11 Aug 2002 01:16 AM — 6 posts, 21,933 views.

Singapore #0
I got the make problem working (downloaded the entier CYGWIN which took me hours).

However, can someone tell me how to make it that players can type who instead of who_1?

Also, after installing dual class, there are errors here and there:
Quote:

$ make
make smaug
make[1]: Entering directory '/home/David/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_info.c
In file included from act_info.c:25:
mud.h:1066: field 'DUAL_SKILL' declared as a function
mud.h:1067: field 'dual_adept' declared as a function
mud.h:1068: field 'find_skill_level' declared as a function
mud.h:1069: field 'hp_max' declared as a function
mud.h:1070: field 'hp_min' declared as a function
mud.h:1071: field 'use_mana' declared as a function
mud.h:1074: duplicate member 'hp_min'
mud.h:1075: duplicate member 'hp_max'
mud.h:3302: parse error before 'IS_VAMPIRE'
mud.h:3482: syntax error before 'struct'
act_info.c: In function 'do_practice':
act_info.c:3154:warning: implicit declaration of function 'DUAL_SKILL'
act_info.c: In function 'do_slist':
act_info.c:3154:warning: implicit declaration of function 'find_skill_level'
make[1]: *** [act_info.o] Error 1
make[1]: Leaving directory '/home/David/smaug/dist/src'
make: *** [all] Error 2


Help Please! =]
Australia #1
Off the top of my head, because I cant see my code at the moment, in the do_who function you want to remove the section where it checks if the argument is 1. I hope that helps you.
#2
WAIT!

in mud.h there is a line right twords the beguining that says #REQWHOARG simply take that line out..

tadaa :)
Bipper
The amazing one who goes.. and when he doesn't he posts here 0_o
Singapore #3
Where is the do_who function? There are so many but can't find the one with argument 1 part.

Nevermind, managed to solve my problem reading through all the previous forums, now just the error with the dual class :D
Amended on Mon 12 Aug 2002 12:44 PM by Davidgan
Singapore #4
More problems =]

Quote:

$ make
make smaug
make[1]: Entering directory `/home/David/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG comm.c
comm.c: In function `display_prompt':
comm.c:166: warning: implicit declaration of function `default_prompt'
comm.c:166: warning: assignment makes pointer from integer without a cast
comm.c:170: warning: implicit declaration of function `default_fprompt'
comm.c:170: warning: assignment makes pointer from integer without a cast
comm.c:212: warning: implicit declaration of function `make_color_sequence'
comm.c:145: warning: `victim' might be used uninitialized in this function
comm.c: At top level:
comm.c:3438: warning: type mismatch with previous implicit declaration
comm.c:170: warning: previous implicit declaration of `default_fprompt'
comm.c:3438: warning: `default_fprompt' was previously implicitly declared to re
turn `int'
comm.c:3453: warning: type mismatch with previous implicit declaration
comm.c:166: warning: previous implicit declaration of `default_prompt'
comm.c:3453: warning: `default_prompt' was previously implicitly declared to ret
urn `int'
comm.c:3479: redefinition of `display_prompt'
comm.c:142: `display_prompt' previously defined here
make[1]: *** [comm.o] Error 1
make[1]: Leaving directory `/home/David/smaug/dist/src'
make: *** [all] Error 2


This happened when I tried to make a healthbar for the combat system.
Australia Forum Administrator #5
You are using the functions before their declaration. You can prototype them by putting this near the start of the comm.c file (after the includes):


char *default_prompt( CHAR_DATA *ch );
char *default_fprompt( CHAR_DATA *ch );