Every time I try to add something to tables.c I get an error message similar to this (this is actually what I just recieved while adding a liquid mixing command)... What am I missing?
tables.c: In function `skill_function':
tables.c:349: `do_liquid' undeclared (first use in this function)
tables.c:349: (Each undeclared identifier is reported only once
tables.c:349: for each function it appears in.)
tables.c: In function `skill_name':
tables.c:949: `do_liquid' undeclared (first use in this function)
make[1]: *** [o/tables.o] Error 1
make: *** [all] Error 2
By the way, thanks to everyone that's been putting up with these really newbish questions. It's been 6 years since I learned to code on smaug and Im just coming back to it from a total absence.
if ( !IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM) )
return;
if ( obj->item_type != ITEM_POTION )
{
if ( obj->item_type == ITEM_DRINK_CON )
do_drink( ch, obj->name );
else
{
act( AT_ACTION, "$n lifts $p up to $s mouth and tries to drink from it...", ch, obj, NULL, TO_ROOM );
act( AT_ACTION, "You bring $p up to your mouth and try to drink from it...", ch, obj, NULL, TO_CHAR );
}
return;
}
When you were adding liquids, was it a snippet by chance? If so, did it say to add something like:
#ifndef LIQUIDSYSTEM
in misc.c?
If so, go through and make sure do_drink, do_fill, and do_empty all are within the #ifndef LIQUIDSYSTEM and #endif brackets. No other functions should be in there. If other functions reside in there, they will not be "defined" as your compiler is stating, as LIQUIDSYSTEM is defined.
o/misc.o: In function `do_empty':
/home/frobozz/smaug/src/misc.c:1549: multiple definition of `do_empty'
o/liquids.o:/home/frobozz/smaug/src/liquids.c:1755: first defined here
/usr/bin/ld: Warning: size of symbol `do_empty' changed from 1438 to 1454 in o/misc.o
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make: *** [all] Error 2
I've gotten rid of all the errors but that. I dont understand it, I cant find where it's duplicated or how to get rid of it.
I got it! WOO. My problem came from me being too overeager with this code, I changed it from being just two liquids into one new one into multiple (3,4,5,and 6) into one.. I got sloppy. Im a dumb law student.