Chances are that room_flags is not an extended bit vector. But, you're using xIS_SET, not IS_SET. To fix this, you could probably use IS_SET - although you need to think about whether you want the room flags to be extended or not.
This is what I get if I remove that simple little x in xIS_SET.
invade.c:8: error: parse error before '*' token
invade.c: In function `do_invade':
invade.c:10: error: `MAX_INPUT_LENGTH' undeclared (first use in this function)
invade.c:10: error: (Each undeclared identifier is reported only once
invade.c:10: error: for each function it appears in.)
invade.c:13: error: `CHAR_DATA' undeclared (first use in this function)
invade.c:13: error: `victim' undeclared (first use in this function)
invade.c:14: error: `AREA_DATA' undeclared (first use in this function)
invade.c:14: error: `tarea' undeclared (first use in this function)
invade.c:16: error: `bool' undeclared (first use in this function)
invade.c:16: error: parse error before "found"
invade.c:17: error: `MOB_INDEX_DATA' undeclared (first use in this function)
invade.c:17: error: `pMobIndex' undeclared (first use in this function)
invade.c:18: error: `ROOM_INDEX_DATA' undeclared (first use in this function)
invade.c:18: error: `location' undeclared (first use in this function)
invade.c:20: error: `argument' undeclared (first use in this function)
invade.c:20: warning: implicit declaration of function `one_argument'
invade.c:23: warning: implicit declaration of function `atoi'
invade.c:26: warning: implicit declaration of function `send_to_char'
invade.c:26: error: `ch' undeclared (first use in this function)
invade.c:29: error: `first_area' undeclared (first use in this function)
invade.c:30: warning: implicit declaration of function `str_cmp'
invade.c:32: error: `found' undeclared (first use in this function)
invade.c:32: error: `TRUE' undeclared (first use in this function)
invade.c:45: warning: implicit declaration of function `get_mob_index'
invade.c:45: error: `NULL' undeclared (first use in this function)
invade.c:53: warning: implicit declaration of function `get_room_index'
invade.c:53: warning: implicit declaration of function `number_range'
invade.c:58: warning: implicit declaration of function `IS_SET'
invade.c:58: error: `ROOM_SAFE' undeclared (first use in this function)
invade.c:63: warning: implicit declaration of function `create_mobile'
invade.c:64: warning: implicit declaration of function `char_to_room'
invade.c:65: warning: implicit declaration of function `act'
invade.c:65: error: `AT_IMMORT' undeclared (first use in this function)
invade.c:65: error: `TO_ROOM' undeclared (first use in this function)
invade.c:10: warning: unused variable `arg1'
invade.c:11: warning: unused variable `arg2'
invade.c:12: warning: unused variable `arg3'
make[1]: *** [invade.o] Error 1
make: *** [all] Error 2
Ok, I put in a piece of code and I solved all the errors with it myself(ain't ya proud of me?) except this one:
'TO_ROOM' undeclared(first use in this function)
I put a bit of the code here with 5 asterisks by the error line.
{
send_to_char( "You didn't realize it when you started, but you haven't enough material\n\r", ch);
return;
}
extract_obj( material );
}
obj_to_char( clothing, ch );
send_to_char("You snip and sew, creating a new piece of clothing.\n\r", ch);
act( AT_ACTION,"$n snips and sews, creating a new piece of clothing.", ch, NULL, NULL, T0_ROOM); *****
xnum = number_range(0, 100);
if (xnum < 25) /*did the sewkit break?*/
{
extract_obj( sewkit );
act( AT_ACTION, "$n pulls too hard on the needle and it breaks!", ch, NULL, NULL, TO_ROOM);
send_to_char( "You pull too hard on the needle and it breaks!\n\r", ch );
}
learn_from_failure( ch, gsn_tailor );
return;
}
else /* failure of skill */
{
for (x=number_range(1,9); x<=mnum; x++)
{
material = get_obj_carry (ch, arg1 );
if (material == NULL)
{
send_to_char( "Your thread knots, and your material is ruined.\n\r", ch);
return;
}
extract_obj( material );
}
send_to_char("You snip and sew, but only make a mess.\n\r", ch);
act( AT_ACTION, "$n snips and sews but doesn't make anything useful.", ch, NULL, NULL, TO_ROOM);
xnum = number_range(0, 100);
if (xnum < 25) /*did the sewkit break?*/
{
extract_obj( sewkit );
act( AT_ACTION, "$n pulls too hard on the needle and it breaks!", ch, NULL, NULL, TO_ROOM);
send_to_char( "You pull too hard on the needle and it breaks!\n\r", ch );
}
learn_from_success( ch, gsn_tailor );
}
}
Look carefully - you used the digit zero, not the letter 'o'. This is easy to spot when you use a font that marks the difference well. I use one that happens to do so nicely: http://david.the-haleys.org/faq/index.php?sid=95&lang=en&action=artikel&cat=3&id=2&artlang=en
K, just when I think everything is solved I get a batch of errors I've never seen before:
skills.o(.text+0xf105): In function `do_dye.0':
/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6469: undefined reference to `_gsn_dye'
skills.o(.text+0xf142):/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6471: undefined reference to `_gsn_dye'
skills.o(.text+0xfa13):/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6599: undefined reference to `_gsn_dye'
skills.o(.text+0xfa82):/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6607: undefined reference to `_gsn_dye'
skills.o(.text+0xfac8): In function `do_tailor':
/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6275: undefined reference to `_gsn_tailor'
skills.o(.text+0xfb05):/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6277: undefined reference to `_gsn_tailor'
skills.o(.text+0x10322):/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6433: undefined reference to `_gsn_tailor'
skills.o(.text+0x10448):/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/skills.c:6458: undefined reference to `_gsn_tailor'
tables.o(.text+0x1560): In function `skill_function':
/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/tables.c:269: undefined reference to `_do_dye'
tables.o(.text+0x4d84): In function `skill_name':
/cygdrive/c/windows/desktop/bakups/textfinal/smaug1/smaug/dist/src/tables.c:949: undefined reference to `_do_dye'
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make: *** [all] Error 2
I don't see anywhere where I put an extra _ in these examples.
Make sure all .c files you want are on the makefile list.
Make sure that you've actually defined the symbols, e.g. you need to add the GSNs to the list in db.c.
What it's telling you is that you've told it a symbol exists (in a .h file) but you've not told it where the memory for that symbol exists (in a .c file.)
Hrrrmmm, I removed the do_dye skill and function because I couldn't get it fixed, but I made a seperate .c file for the do_tailor function and it works now. I still don't know how that happened but oh well, I'll keep looking into it. Perhaps if I do the same to the do_dye function it'll work.
In the meantime, I put in do_tailor and the skill works fine, but for some reason it refuses to accept the objtype ITEM_SEWKIT, which is required for the skill, as a valid skill. I put in entries in db.c, act_obj.c, and mud.h, and it still don't show as a working itemtype. Did I miss an entry somewhere? I've never put in a new type before.
Thanks and Godbless,
Longbow
I went and added a .c file for the do_dye. it fixed the problem. Now does anyone know what I need to do to make the item types work?
Howdy folks, I'm back after a long break. Would somebody please tell me how to put in a new object type? I've grepped and grepped on other types and I thought I had all the places required put in, but I guess not. Would somebody give me a list of where I need to put in the new type?
Thanks and Godbless,
Longbow
You know, I could have made this a whole new subject, but why not use this old one? :D