Welcome to the Builder Academy

Question Races

More
21 Jun 2012 18:37 - 21 Jun 2012 18:39 #153 by Halenbane
Replied by Halenbane on topic Re: Races
It seems that your case 'r' is full of stuff it doesn't need.
Temporarily comment that out and try this case.
Code:
case 'r': if (!str_cmp(field, "race")) sprinttype(GET_RACE(c), pc_race_types, str, slen); else if (!str_cmp(field, "room")) { /* in NOWHERE, return the void */ /* see note in dg_scripts.h */ #ifdef ACTOR_ROOM_IS_UID snprintf(str, slen, "%c%ld",UID_CHAR, (IN_ROOM(c)!= NOWHERE) ? (long) world[IN_ROOM(c)].number + ROOM_ID_BASE : ROOM_ID_BASE); #else snprintf(str, slen, "%d", (IN_ROOM(c)!= NOWHERE) ? world[IN_ROOM(c)].number : 0); #endif } break;
Last edit: 21 Jun 2012 18:39 by Halenbane.
The following user(s) said Thank You: Papaya Pete

Please Log in or Create an account to join the conversation.

More
21 Jun 2012 23:30 #161 by Papaya Pete
Replied by Papaya Pete on topic Re: Races

It seems that your case 'r' is full of stuff it doesn't need.
Temporarily comment that out and try this case.


Hmmm Ok I tried that. And this is the compiling error I'm getting:
Code:
dg_variables.c: In function ‘find_replacement’: dg_variables.c:969:22: error: expected ‘)’ before ‘;’ token dg_variables.c:969:22: error: too few arguments to function ‘sprinttype’

And... as for lines 972 and 978, they are...
Code:
GET_RACE(ch) = ra; sprinttype(GET_RACE(ch), pc_race_types, str, slen);

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 00:10 - 22 Jun 2012 00:10 #162 by Liko
Replied by Liko on topic Re: Races

Papaya Pete wrote:

It seems that your case 'r' is full of stuff it doesn't need.
Temporarily comment that out and try this case.


Hmmm Ok I tried that. And this is the compiling error I'm getting:
Code:
dg_variables.c: In function ‘find_replacement’: dg_variables.c:969:22: error: expected ‘)’ before ‘;’ token dg_variables.c:969:22: error: too few arguments to function ‘sprinttype’

And... as for lines 972 and 978, they are...
Code:
GET_RACE(ch) = ra; sprinttype(GET_RACE(ch), pc_race_types, str, slen);


There is no reason line 972 and 978 should be putting out errors. I would change them back to GET_RACE(c). Also, I would check your #define GET_RACE in utils.h. Will you post that for me? I'm also wondering if it's your compiler being super picky.

Randian(0.0.0)
Owner/Developer
Last edit: 22 Jun 2012 00:10 by Liko.

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 00:38 #163 by Vatiken
Replied by Vatiken on topic Re: Races
$100 the error is the GET_RACE(ch) define.

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 00:41 #164 by Liko
Replied by Liko on topic Re: Races

Vatiken wrote: $100 the error is the GET_RACE(ch) define.


ha well after I saw those exact lines, I was like that is the only option left.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 03:41 #168 by Papaya Pete
Replied by Papaya Pete on topic Re: Races

Vatiken wrote:

$100 the error is the GET_RACE(ch) define.


ha well after I saw those exact lines, I was like that is the only option left.


I wish! I actually had copied the GET_RACE(ch) from an earlier post of what lines had the errors. I already fixed that.

There is no reason line 972 and 978 should be putting out errors. I would change them back to GET_RACE(c). Also, I would check your #define GET_RACE in utils.h. Will you post that for me? I'm also wondering if it's your compiler being super picky.


That's what I'm thinking. It doesn't make much sense for it to be giving those errors. Anyhow, I took at look at #define GET_RACE in utils.h.

/* Race of ch. */
#define GET_RACE(ch) ((ch)->player.race);


I also just double-checked that I did everything in utils.h right, and everything seemed to check out.

As for your suspicions about my compiler being super-picky.... it wouldn't surprise me. At least all this makes for interesting discussion, eh?

Please Log in or Create an account to join the conversation.

Time to create page: 0.233 seconds