Hi all i am trying to add PRF2_FLAG/FLAGGED to my mud. I get a parse
error when compiling that looks like this:
utils.c: In function `GET_REINCARN':
utils.c:473: parse error before `temp'
utils.c:475: parse error before `temp'
utils.c:477: parse error before `temp'
utils.c: In function `ADD_REINCARN':
utils.c:487: parse error before `;'
utils.c:491: parse error before `;'
utils.c:494: parse error before `;'
utils.c:504: `room' undeclared (first use this function)
utils.c:504: (Each undeclared identifier is reported only once
utils.c:504: for each function it appears in.)
utils.c:506: `i' undeclared (first use this function)
utils.c:508: warning: `return' with a value, in function returning void
pretty ugly. The code itself around line GET_REINCARN looks like this:
int GET_REINCARN(struct char_data *ch)
{
int temp = 0;
if (PRF2_FLAGGED(ch, PRF2_REINCARN1))
temp +=1;
if (PRF2_FLAGGED(ch, PRF2_REINCARN2))
temp += 2;
if (PRF2_FLAGGED(ch, PRF2_REINCARN3))
temp += 4;
return (temp +1);
}
void ADD_REINCARN(struct char_data *ch)
{
if (GET_REINCARN(ch) >= 8)
return;
if (!PRF2_FLAGGED(ch, PRF2_REINCARN1))
SET_BIT(PRF2_FLAGS(ch), PRF2_REINCARN1);
else {
REMOVE_BIT(PRF2_FLAGS(ch), PRF2_REINCARN1);
if (!PRF2_FLAGGED(ch, PRF2_REINCARN2))
SET_BIT(PRF2_FLAGS(ch), PRF2_REINCARN2);
else {
REMOVE_BIT(PRF2_FLAGS(ch), PRF2_REINCARN2);
SET_BIT(PRF2_FLAGS(ch), PRF2_REINCARN3);
}
}
}
As far as my eye can tell i am not typoing here. Though it seems that is
what is happening. In order to add the PRF2 stuff i adjusted (as far as i
remember) these files:
constants.c added const char *preference_bits2[] {};
structs.h added long pref2;
utils.h added PRF2_FLAGS, PRF2_FLAGGED, and PRF2_TOG_CHK
as far as I can tell that is about all the places I thought would be
necessary to add junk to make PRF2 a reality. Any help in this would be
greatly appreciated! If you want more info just hollar.
Peter the Wart
*-=-=-=-=-=-=-=* w0nderful *-=-* w0rld *-=-* 0f *-=-* wart *-=-=-=-=-*
hartman@kuntrynet.com
wart@trilidun.kuntrynet.com
http://trilidun.kuntrynet.com
Eudaemonia Mud: mud.kuntrynet.com Port 4000
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST