Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing, DotBot

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Clan Roster Snippet compiling...
Forum Rules | Mark all | Recent Posts

Clan Roster Snippet compiling issue
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 11, 2006, 12:47 am
Go to the top of the page
Go to the bottom of the page

jparkin

GroupMembers
Posts33
JoinedAug 11, 2006

hey guys!

i JUST created my account like not even 5 minutes ago so bare with me if i'm a complete noob :)

i have downloaded a TON of snippets from AFKMud. One of which is the Clan Roster snippet.

i followed the instrcutions as good as i possibly could and then i compiled and i get this error:

build.c: In function `do_mset':
build.c:1988: error: structure has no member named `Class'
build.c: In function `fold_area':
build.c:6065: warning: suggest explicit braces to avoid ambiguous `else'
make[1]: *** [build.o] Error 1
make[1]: Leaving directory `blahblahblah'
make: *** [all] Error 2


is anyone able to help me out with this? :)

thanks a bunch in advance!
-Josh
       
Post is unread #2 Aug 11, 2006, 2:25 am
Go to the top of the page
Go to the bottom of the page

Exo

GroupMembers
Posts3
JoinedSep 30, 2004

I'd wager on line 1988 in build.c, it's referring to ch->Class instead of ch->class. Note the capitalized leter 'c'.
g++ has a fit with things such as 'new' and 'class' as variable names, so class was capitalized in the snippet to avoid that problem while still keeping variable names in a comprehendable standard.

You don't have to change all instances of Class, just the ones that refer to ch->Class, since your char_data struct most likely contains the field 'class' and not 'Class'. Check the chunks of code the snippet had you add to clans.c as well. I'm sure there's some instances of this there also.

As for the explicit braces gripe, I don't know what the line it's referring to looks like but this is generally what you should do:

If the code looks like this:
if( whatever == something )
  do_whatever();
  if( !whatever )
    return;
else if( ect > ect2 )


It might complain about an ambiguous else, so you would have to change it to something like this:
if( whatever == something )
{
  do_whatever();
  if( !whatever )
    return;
}
else if( ect > ect2 )


Does that make sense? I'm not sure if I explained the reasoning behind that properly, its just second-nature for me to add braces around whatever ifcheck that bug might be referring to and I don't really think about it anymore.

Exo
http://darkrealms.genesismuds.com
       
Pages:<< prev 1 next >>