Login

Posted by Asean Novari on Thu 24 Feb 2005 11:51 PM — 14 posts, 50,453 views.

USA #0
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
Amended on Fri 25 Feb 2005 12:10 AM by Asean Novari
Canada #1
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.
USA #2
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: *****

Amended on Fri 25 Feb 2005 12:43 AM by Asean Novari
Canada #3
Do you have a \n\r at the end of the line that prints the name request? If you do, try removing it.
USA #4
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..
Canada #5
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.
Amended on Fri 25 Feb 2005 01:21 AM by Greven
USA #6
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
Amended on Fri 25 Feb 2005 01:27 AM by Asean Novari
Canada #7
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);
USA #8
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
Canada #9
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 );
    }
Amended on Fri 25 Feb 2005 02:27 AM by Greven
USA #10
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
Canada #11
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.
USA #12
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..
Amended on Fri 25 Feb 2005 08:42 PM by Asean Novari
USA #13
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.