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, 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 ➜ making all newbies nutrol

making all newbies nutrol

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 Fri 22 Oct 2004 11:58 PM (UTC)
Message
Ok I have been trying to edit my code so that all newbies are neutral but I don’t know what IM doing wrong but I need help

What I have done ( I know it is very wrong lol )


Nanny_Fun(HANDLE_CON_GET_ALIGNMENT)
{
CharData *ch = CH(d);

ch->alignment = 0;


d->connected = CON_GET_TIMEZONE;
return;
}


The old NANY

Nanny_Fun(HANDLE_CON_GET_ALIGNMENT)
{
CharData *ch = CH(d);

switch (toupper(argument[0]))
{
case 'G':
d_println(d, "{cYou are now {Wgood{c.{x");
ch->alignment = 750;
break;
case 'N':
d_println(d, "{cYou are now {Yneutral{c.{x");
ch->alignment = 0;
break;
case 'E':
d_println(d, "{cYou are now {Revil{c.{x");
ch->alignment = -750;
break;
default:
d_println(d, "{cThat's not a valid alignment.{x");
d_println(d,
"{cWhich alignment ({WG{c)ood/({WN{c)eutral/({WE{c)vil? {x");
return;
}

send_deity_info(d);
d_println(d, "{cWhat deity would you like to worship?{x");
d->connected = CON_GET_DEITY;
return;
}

If you could just give me a hint I would be happy because IM stumped
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #1 on Sat 23 Oct 2004 12:17 AM (UTC)
Message
To help you with whats wrong, you need to tell us whats actually happening, since that looks "ok", but maybe not what you wanted.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Lloyd graham   Canada  (13 posts)  Bio
Date Reply #2 on Sat 23 Oct 2004 12:49 AM (UTC)
Message
Ok what is happening is that it compiles, but when you make a new chare it ether will sending info to the new char just before you go to get your alignment, or it will create but when you use the score command the mud will crash and the new char will be lost. it seems that it isn’t actually setting the player to a alignment of neutral.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #3 on Sat 23 Oct 2004 01:48 AM (UTC)
Message
Oh, that looks like it may have to do with the fact that you are not setting the characters Deity, as you are skipping that step. Maybe include this:
send_deity_info(d);
d_println(d, "{cWhat deity would you like to worship?{x");
d->connected = CON_GET_DEITY;
return;
Instead of
d->connected = CON_GET_TIMEZONE;
return;
}

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Lloyd graham   Canada  (13 posts)  Bio
Date Reply #4 on Sat 23 Oct 2004 05:55 AM (UTC)
Message
Yep looks like that was the problem so seems I need to get rid of the whole deity thing at the same time I was hoping to take smaller steps doing it all one at a time lol but this will do

PS thanx I was totally looking in the wrong place
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #5 on Fri 08 Apr 2005 03:52 AM (UTC)
Message
You could set a mprog at the starting room to mset their align to 0...
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #6 on Sun 10 Apr 2005 06:09 AM (UTC)
Message
These posts are really relevant to "compiling SMAUG", so I have moved them. You will get a better response if you post to the correct part of the forum.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


19,848 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.