Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Big undeclared problem...

Big undeclared problem...

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Alokael   (6 posts)  Bio
Date Sat 29 Jan 2005 07:53 AM (UTC)
Message
Hey everyone.. I was trying to compile and kept getting the following errors, while a bunch of other people who have the same code (the DBSC 2.5 codebase) didn't seem to get them.. I didn't edit ANYTHING in these files at all.. The version is seemingly what everyone else got.. so I'm clueless. Anyway, here are the errors:

act_info.c: In function `show_visible_affects_to_char':
act_info.c:619: parse error before `z'
act_info.c:825: `z' undeclared (first use in this function)
act_info.c:825: (Each undeclared identifier is reported only once
act_info.c:825: for each function it appears in.)
act_info.c: In function `do_who':
act_info.c:3395: parse error before `*'
act_info.c:3555: parse error before `char'
act_info.c:3556: `rarg' undeclared (first use in this function)
act_info.c:3973: `cur_who' undeclared (first use in this function)
act_info.c:4024: `first_mortal' undeclared (first use in this function)
act_info.c:4028: `first_unknown' undeclared (first use in this function)
act_info.c:4032: `first_deadly' undeclared (first use in this function)
act_info.c:4036: `first_skilled' undeclared (first use in this function)
act_info.c:4040: `first_experienced' undeclared (first use in this function)
act_info.c:4044: `first_ultimate' undeclared (first use in this function)
act_info.c:4048: `first_veteran' undeclared (first use in this function)
act_info.c:4052: `first_fearsome' undeclared (first use in this function)
act_info.c:4056: `first_legendary' undeclared (first use in this function)
act_info.c:4060: `first_epic' undeclared (first use in this function)
act_info.c:4064: `first_ascendant' undeclared (first use in this function)
act_info.c:4068: `first_transcendent' undeclared (first use in this function)
act_info.c:4072: `first_champion' undeclared (first use in this function)
act_info.c:4076: `first_titan' undeclared (first use in this function)
act_info.c:4080: `first_mythical' undeclared (first use in this function)
act_info.c:4084: `first_omnipotent' undeclared (first use in this function)
act_info.c:4088: `first_demigod' undeclared (first use in this function)
act_info.c:4092: `first_grouped' undeclared (first use in this function)
act_info.c:4096: `first_groupwho' undeclared (first use in this function)
act_info.c:4100: `first_imm' undeclared (first use in this function)
act_info.c:4026: warning: unreachable code at beginning of switch statement
act_info.c:4126: `next_who' undeclared (first use in this function)
act_info.c: In function `do_combat':
act_info.c:6751: parse error before `reverse'
act_info.c:6754: `reverse' undeclared (first use in this function)
make[1]: *** [act_info.o] Error 1
make[1]: Leaving directory `/home/tjzinc/dbsc/src'
make: *** [all] Error 2


If ANYONE can help, PLEASE help! Thanks in advance!
Top

Posted by Frobozz   (75 posts)  Bio
Date Reply #1 on Sat 29 Jan 2005 03:13 PM (UTC)
Message
Can you post the code that the compiler is complaining about?
Top

Posted by Alokael   (6 posts)  Bio
Date Reply #2 on Sat 29 Jan 2005 05:47 PM (UTC)
Message
First, the lines getting the parse errors (not exactly in THIS order.. there should be a lot more stuff in between but then this post would be massive):

sh_int z = get_aura(victim);

WHO_DATA *cur_who = NULL;

char rarg[MAX_STRING_LENGTH];

Now, the undeclareds.. :

argument2 = one_argument( argument2, rarg );

CREATE( cur_who, WHO_DATA, 1 );

cur_who->next = first_mortal;
first_mortal = cur_who;
break;
case WT_UNKNOWN:
cur_who->next = first_unknown;
first_unknown = cur_who;
break;
case WT_DEADLY:
cur_who->next = first_deadly;
first_deadly = cur_who;
break;
case WT_SKILLED:
cur_who->next = first_skilled;
first_skilled = cur_who;
break;
case WT_EXPERIENCED:
cur_who->next = first_experienced;
first_experienced = cur_who;
break;
case WT_ULTIMATE:
cur_who->next = first_ultimate;
first_ultimate = cur_who;
break;
case WT_VETERAN:
cur_who->next = first_veteran;
first_veteran = cur_who;
break;
case WT_FEARSOME:
cur_who->next = first_fearsome;
first_fearsome = cur_who;
break;
case WT_LEGENDARY:
cur_who->next = first_legendary;
first_legendary = cur_who;
break;
case WT_EPIC:
cur_who->next = first_epic;
first_epic = cur_who;
break;
case WT_ASCENDANT:
cur_who->next = first_ascendant;
first_ascendant = cur_who;
break;
case WT_TRANSCENDENT:
cur_who->next = first_transcendent;
first_transcendent = cur_who;
break;
case WT_CHAMPION:
cur_who->next = first_champion;
first_champion = cur_who;
break;
case WT_TITAN:
cur_who->next = first_titan;
first_titan = cur_who;
break;
case WT_MYTHICAL:
cur_who->next = first_mythical;
first_mythical = cur_who;
break;
case WT_OMNIPOTENT:
cur_who->next = first_omnipotent;
first_omnipotent = cur_who;
break;
case WT_DEMIGOD:
cur_who->next = first_demigod;
first_demigod = cur_who;
break;
case WT_GROUPED:
cur_who->next = first_grouped;
first_grouped = cur_who;
break;
case WT_GROUPWHO:
cur_who->next = first_groupwho;
first_groupwho = cur_who;
break;
case WT_IMM:
cur_who->next = first_imm;
first_imm = cur_who;
break;

}

}


So... there it is.. sort of. If that doesn't help too much, I can put up a link with a text file containing the entire code.. Thanks!
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #3 on Sat 29 Jan 2005 10:42 PM (UTC)
Message
I'm sure most of the errors are just because of the parse error. Since it says there is a parse error before "z", you may want to look in that area. Of course, if you havent edited anything, perhaps mud.h has some screw up where sh_int isn't defined. What are you using to compile?

To test this, I would just go looking in mud.h for sh_int. There should be a line that defines it. Also, though you will probably get errors elsewhere, try changing sh_int z to short z or short int z. Then see what the error looks like.

And for future reference, put your code in code tags so its easier to read here on the forum :P

~Nick Cash
http://www.nick-cash.com
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #4 on Sun 30 Jan 2005 12:24 AM (UTC)
Message
Also, if mud.h doesn't have a define for sh_int, you can change


 sh_int z = get_aura(victim);


to


 short z = get_aura(victim);


and it will work just fine.
Top

Posted by Alokael   (6 posts)  Bio
Date Reply #5 on Sun 30 Jan 2005 05:34 AM (UTC)
Message
Now it says parse error before 'short'.. Arg. :/
Top

Posted by Frobozz   (75 posts)  Bio
Date Reply #6 on Sun 30 Jan 2005 01:46 PM (UTC)
Message
What comes immediately before that line?
Top

Posted by Alokael   (6 posts)  Bio
Date Reply #7 on Mon 31 Jan 2005 04:28 AM (UTC)
Message
This does...

void show_visible_affects_to_char( CHAR_DATA *victim, CHAR_DATA *ch )
{
	char buf[MAX_STRING_LENGTH];
	char name[MAX_STRING_LENGTH];

	if ( IS_NPC( victim ) )
		strcpy( name, victim->short_descr );
	else
		strcpy( name, victim->name);
	name[0] = toupper(name[0]);
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #8 on Mon 31 Jan 2005 05:58 PM (UTC)
Message
Could you show us the exact error, and the full function, while having the line numbers labeled? I don't see anything wrong with that partial function.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


22,407 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.