[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  Big undeclared problem...
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Big undeclared problem...
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Zeno   USA  (2,871 posts)  [Biography] bio   Moderator
Date Mon 31 Jan 2005 05:58 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Alokael   (6 posts)  [Biography] bio
Date Mon 31 Jan 2005 04:28 AM (UTC)  quote  ]
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]);
[Go to top] top

Posted by Frobozz   (75 posts)  [Biography] bio
Date Sun 30 Jan 2005 01:46 PM (UTC)  quote  ]
Message
What comes immediately before that line?
[Go to top] top

Posted by Alokael   (6 posts)  [Biography] bio
Date Sun 30 Jan 2005 05:34 AM (UTC)  quote  ]
Message
Now it says parse error before 'short'.. Arg. :/
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Sun 30 Jan 2005 12:24 AM (UTC)  quote  ]
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.

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Sat 29 Jan 2005 10:42 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Alokael   (6 posts)  [Biography] bio
Date Sat 29 Jan 2005 05:47 PM (UTC)  quote  ]
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!
[Go to top] top

Posted by Frobozz   (75 posts)  [Biography] bio
Date Sat 29 Jan 2005 03:13 PM (UTC)  quote  ]
Message
Can you post the code that the compiler is complaining about?
[Go to top] top

Posted by Alokael   (6 posts)  [Biography] bio
Date Sat 29 Jan 2005 07:53 AM (UTC)  quote  ]
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!
[Go to top] 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.


2,764 views.

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]