Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Make it force your class
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lloyd graham
Canada (13 posts) Bio
|
Date
| Sun 24 Oct 2004 03:32 AM (UTC) Amended on Sun 24 Oct 2004 03:57 AM (UTC) by Lloyd graham
|
Message
| OK I was grateful for the help with alignment and now am working on classes ( I thought it would be just as easy lol ) but it wasn’t and now IM stuck I want my players to start with no class but found the code didn’t support that so I made a class called NONE and am trying to make the Nany.c set that automatically
This is what IM writhing in
Nanny_Fun(HANDLE_CON_GET_NEW_CLASS)
{
CharData *ch = CH(d);
ch->Class = NONE;
mud_info.stats.newbies++;
d_println(d, "{cWhat time zone do you live in? {x");
d->connected = CON_GET_TIMEZONE;
}
This is the error message IM getting when I compile
$ make install
20:24:53 : Compiling nanny.c...
nanny.c: In function `void HANDLE_CON_GET_NEW_CLASS(Descriptor*, const char*)':
nanny.c:638: error: `NONE' undeclared (first use this function)
nanny.c:638: error: (Each undeclared identifier is reported only once for each
function it appears in.)
make: *** [o/nanny.o] Error 1
IM guessing that I need to tell it to look in my class file to get NONE but I cant think of a way to do that. I may also have made a mistake or two in how IM setting it up too so any help and advice would be appreciated. | Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #1 on Fri 08 Apr 2005 03:51 AM (UTC) |
Message
| Might try to post this in the SMAUG prgramming forum. That way more programmers will see it | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sun 10 Apr 2005 06:08 AM (UTC) |
Message
| You say you "made a class called NONE". Did you put it into mud.h, that is where I would put the definition for it. Also might call it NO_CLASS or something more description. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Dralnu
USA (277 posts) Bio
|
Date
| Reply #3 on Sat 23 Apr 2005 07:55 PM (UTC) |
Message
| You could remove the choose class at creation, and set a mob at the start who will mset the class on the new player to NONE before running them through a tutorial or something. | Top |
|
Posted by
| Robert Powell
Australia (367 posts) Bio
|
Date
| Reply #4 on Sat 23 Apr 2005 11:44 PM (UTC) Amended on Sat 23 Apr 2005 11:45 PM (UTC) by Robert Powell
|
Message
| This thread is getting old i think, but here is a section from my nanny, this is what i did to go classless.
case CON_GET_NEW_SEX:
switch ( argument[0] )
{
case 'm':
case 'M':
ch->sex = SEX_MALE;
break;
case 'f':
case 'F':
ch->sex = SEX_FEMALE;
break;
case 'n':
case 'N':
ch->sex = SEX_NEUTRAL;
break;
default:
write_to_buffer( d, "That's not a sex.\n\rWhat IS your sex? ", 0 );
return;
}
write_to_buffer( d, "\n\rYou may choose from the following races, or type help [race] to learn more:\n\r[", 0 );
buf[0] = '\0';
for ( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if (iRace != RACE_VAMPIRE
&& race_table[iRace]->race_name && race_table[iRace]->race_name[0] != '\0'
&& !IS_SET(race_table[iRace]->class_restriction, 1 << ch->class)
&& str_cmp(race_table[iRace]->race_name,"unused") )
{
if ( iRace > 0 )
{
if ( strlen(buf)+strlen(race_table[iRace]->race_name) > 77 )
{
strcat( buf, "\n\r" );
write_to_buffer( d, buf, 0 );
buf[0] = '\0';
}
else
strcat( buf, " " );
}
strcat( buf, race_table[iRace]->race_name );
}
}
strcat( buf, "]\n\r: " );
write_to_buffer( d, buf, 0 );
d->connected = CON_GET_NEW_RACE;
break;
case CON_GET_NEW_RACE:
ch->class = 0;
Delete CON_GET_NEW_CLASS, replace GET_SEX with above and add the ch->class = class number at the start of get_new_race.
The real problem is how you display class in things like score and who, I cheated and made a citizen class, tho im thinking of changing that around a bit. |
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | 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.
16,780 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top