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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Login

Login

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


Posted by Asean Novari   USA  (82 posts)  [Biography] bio
Date Thu 24 Feb 2005 11:51 PM (UTC)

Amended on Fri 25 Feb 2005 12:10 AM (UTC) by Asean Novari

Message
What I would like it to be
*display greeting*
What is your name:
What is your password:



What it is
*display greeting with whats your name question*
What is your password:


how do I either get this new question added
or.. make it so when player enters name after standard
greeting their name gets displayed on same line as question

*edit*
This involves making it so its not looking for the answer to
the question before it asks it... Ive been successful adding
the new question by using the guides.. but it still wants
the name given right after the greeting instead of when it
asks for it



[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Fri 25 Feb 2005 12:21 AM (UTC)
Message
What do you mean "but it still wants the name given right after the greeting instead of when it asks for it"? Do you mean you want it to display:

*greeting*
What is your name: Greven
What is your password: ********


Do you mean that the problem is

*greeting*
Greven What is your name:
What is your password: ********

If you can give an exact look of what it looks like now(copy&paste) and what you want it to look like would be helpful.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Asean Novari   USA  (82 posts)  [Biography] bio
Date Reply #2 on Fri 25 Feb 2005 12:39 AM (UTC)

Amended on Fri 25 Feb 2005 12:43 AM (UTC) by Asean Novari

Message
Text received from Mud BOLD
Text sent to Mud ITALIC


*** REALITY ***

SWReality 1.0 by Sean (Durga the Hutt) Cooper - specs@golden.net

Original SMAUG 1.0 written by Thoric (Derek Snider) with help from
Altrag, Blodkai, Narn, Haus, Scryn, Swordbearer, Rennard, Tricops and Gorog.
Original MERC 2.1 code by Hatchet, Furey, and Kahn. Original DikuMUD code by:
Hans Staerfeldt, Katja Nyboe, Tom Madsen, Michael Seifert && Sebastian Hammer
Star Wars and Star Wars names are a copyright of Lucasfilm ltd.

Please enter your name:
<-- Is part of greeting
Admin <-- MUST get entered to get next question
Enter your name: Admin
Password: *****



This is what i would like it to be

GREETING
Enter your name: Admin
Password: *****




[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #3 on Fri 25 Feb 2005 12:42 AM (UTC)
Message
Do you have a \n\r at the end of the line that prints the name request? If you do, try removing it.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Asean Novari   USA  (82 posts)  [Biography] bio
Date Reply #4 on Fri 25 Feb 2005 12:45 AM (UTC)
Message
Yes at the end of the line which i want the name request to be on it does have that.. how do i get rid of the name request upon mud connect..



[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #5 on Fri 25 Feb 2005 01:20 AM (UTC)

Amended on Fri 25 Feb 2005 01:21 AM (UTC) by Greven

Message
Why would you want to get rid of the name request? Besides it being painfully obvious, how do people know what to enter?

If you want to remove it, simple remove the line your using to print it out.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Asean Novari   USA  (82 posts)  [Biography] bio
Date Reply #6 on Fri 25 Feb 2005 01:25 AM (UTC)

Amended on Fri 25 Feb 2005 01:27 AM (UTC) by Asean Novari

Message
Ok i guess i must not be explaining myself correctly..

This is what I want to see when i connect..

*GREETING*
Whats your name: CON_GET_NAME
Password: CON_GET_PASSWORD


whereas right now it gives

*GREETING* CON_GET_NAME
Whats your name: CON_GET_NAME
Password: CON_GET_PASSWORD



[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #7 on Fri 25 Feb 2005 01:30 AM (UTC)
Message
If your using something similiar to this to produce your greeting help file, you could modify it as such
        /*
         * Send the greeting.
         */

        {
                extern char *help_greeting;

                if (help_greeting[0] == '.')
                        send_to_desc_color(help_greeting + 1, dnew);
                else
                        send_to_desc_color(help_greeting, dnew);

        }

        send_to_desc_color("Enter your name:", dnew);

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Asean Novari   USA  (82 posts)  [Biography] bio
Date Reply #8 on Fri 25 Feb 2005 02:22 AM (UTC)
Message
Ive searched for the spot that calls for my greeting.. i cant
seem to find it.. so i dont know if im using something similar
to that or not



[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #9 on Fri 25 Feb 2005 02:26 AM (UTC)

Amended on Fri 25 Feb 2005 02:27 AM (UTC) by Greven

Message
In comm.c do a find for the word "greeting", in swrfuss it should look like this:
    /*
     * Send the greeting.
     */
    {
	extern char * help_greeting;
	if ( help_greeting[0] == '.' )
	    write_to_buffer( dnew, help_greeting+1, 0 );
	else
	    write_to_buffer( dnew, help_greeting  , 0 );
    }

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Asean Novari   USA  (82 posts)  [Biography] bio
Date Reply #10 on Fri 25 Feb 2005 02:34 AM (UTC)
Message
gives this error


Administrator@Home ~/swr1fuss/src
$ make
make -s swreality
  Compiling o/comm.o....
comm.c: In function `new_descriptor':
comm.c:770: warning: implicit declaration of function `send_to_desc_color'
comm.c:776: warning: redundant redeclaration of `send_to_desc_color' in same scope
comm.c:770: warning: previous declaration of `send_to_desc_color'
make[1]: *** [o/comm.o] Error 1
make: *** [all] Error 2



[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #11 on Fri 25 Feb 2005 02:37 AM (UTC)
Message
You may need to use write_to_desc, your implementation is different from mine clearly, but just move where ever you put your other lineto print it out up to that spot and you should be fine.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Asean Novari   USA  (82 posts)  [Biography] bio
Date Reply #12 on Fri 25 Feb 2005 08:32 PM (UTC)

Amended on Fri 25 Feb 2005 08:42 PM (UTC) by Asean Novari

Message
Thank you Greven.. i had to change the configuration of the
way you suggested and had to change the function to
write_to_buffer.. but other than that it works great.. my
first question is now after the greeting rather than included
in it.. I appreciate the assistance and the patience..

write_to_buffer( dnew, help_greeting+1, 0 );

instead of suggested
send_to_desc_color(help_greeting + 1, dnew);

thanks again

**
On an added note could you tell me why cygwin gave me an error
and said there wasnt enough "arguments" when the 0 on the end
of those corrected statements was missing. What does the 0
represent..



[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #13 on Fri 25 Feb 2005 10:09 PM (UTC)
Message
The definition of the function is this:

void write_to_buffer( DESCRIPTOR_DATA *d, const char *txt, int length )

It expects 3 arguments. Of course, that 0 really should be something else. Luckily the writer of write_to_buffer add this:

    if ( length <= 0 )
	length = strlen(txt);

So that should be just fine. Essentially you could just remove the third argument, like send_to_desc_color did.

~Nick Cash
http://www.nick-cash.com
[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.


32,192 views.

It is now over 60 days since the last post. This thread is closed.     [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.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]