Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!, Google, Bing

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Character height
Forum Rules | Mark all | Recent Posts

Character height
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
* #1 Dec 22, 2005, 12:08 pm   Last edited Dec 22, 2005, 7:21 pm by Samson
Go to the top of the page
Go to the bottom of the page

Stan
Fledgling
GroupMembers
Posts23
JoinedNov 19, 2005

Hi all,
I have been working on fixing this bug in my codebase for the last few days, I copyed and pasted the code for selecting a character's height and build and fully installed the greeting code.
I am using a heavily modified version of the swr gold codebase with olc races, all the smaugfuss bugfixes, and aditional swr gold speciffic bugfixes.
The problem is that after I enter the height I want the character to have and it asks me what build the character should have, I can't get the game to respond whenever anything is typed aside from return.
I get the message that that is not a build.
I have tested the greeting code and found that it works fine aside from it showing everyone as having the same height and build, whidch is only because it was impossible to choose a height and build.
Any suggestions would be greatly appreciated, below is a copy of the code I am having trouble with.

 {
	send_to_buffer("\n\r&zPlease choose a height from the following list:&w\n\r", d );
	buf[0] = '\0';
	col = 0;
	for ( iClass = 0; iClass < 4; iClass++ )
	{
	  if (height_name[iClass] && height_name[iClass][0] != '\0')
	  {
	     sprintf(buf3, "%s", height_name[iClass]);
	     buf3[0] = UPPER(buf3[0]);
	     sprintf(buf2, "&R[&z%-15.15s&R]&w  ", buf3);
	     strcat( buf, buf2 );
	        if ( ++col % 4 == 0 ){
	          strcat( buf, "\n\r";);
                  send_to_buffer(buf, d );
                  buf[0] = '\0';
                }
	     
          }
        }
 }
 else
 {
	send_to_buffer("\n\r&zPlease choose a droid description from the following list:&w\n\r", d );
	buf[0] = '\0';
	col = 0;
	for ( iDroid = 0; iDroid < 8; iDroid++ )
	{
	  if (droid_name[iDroid] && droid_name[iDroid][0] != '\0')
	  {
	     sprintf(buf3, "%s", droid_name[iDroid]);
	     buf3[0] = UPPER(buf3[0]);
	     sprintf(buf2, "&R[&z%-15.15s&R]&w  ", buf3);
	     strcat( buf, buf2 );
	        if ( ++col % 4 == 0 ){
	          strcat( buf, "\n\r";);
                  send_to_buffer(buf, d );
                  buf[0] = '\0';
                }
	     
          }
        }
 }
        if (col % 4 != 0)
          strcat( buf, "\n\r" );
        strcat( buf, "&z:&w " );

	send_to_buffer(buf, d);
   if(!IS_DROID(ch))
    d->connected = CON_GET_HEIGHT;
   else
    d->connected = CON_GET_DROID;
	break;

    case CON_GET_HEIGHT:
        argument = one_argument(argument, arg);
	for ( iClass = 0; iClass < 4; iClass++ )
	{
	    if ( toupper(arg[0]) == toupper(height_name[iClass][0])
	    &&   !str_prefix( arg, height_name[iClass] ))
	    {
		ch->pheight = iClass;
		break;
	    }
	}    
    
	if (iClass == 4 ||  !height_name[iClass] || height_name[iClass][0] == '\0')
        {
            send_to_buffer( "&zThat's not a height.\n\rWhat is it going to be?&w ", d );
            return;
        }

	send_to_buffer("\n\r&zPlease choose a build from the following list:&w\n\r", d );
	buf[0] = '\0';
	col = 0;
	for ( iClass = 0; iClass < 6; iClass++ )
	{
	  if (build_name[iClass] && build_name[iClass][0] != '\0')
	  {
	     sprintf(buf3, "%s", build_name[iClass]);
	     buf3[0] = UPPER(buf3[0]);
	     sprintf(buf2, "&R[&z%-15.15s&R]&w  ", buf3);
	     strcat( buf, buf2 );
	        if ( ++col % 4 == 0 ){
	          strcat( buf, "\n\r";);
                  send_to_buffer(buf, d );
                  buf[0] = '\0';
                }
	     
          }
        }
        if (col % 4 != 0)
          strcat( buf, "\n\r" );
        strcat( buf, "&z:&w " );

	send_to_buffer(buf, d);
    d->connected = CON_GET_BUILD;
	break;

    case CON_GET_BUILD:
        argument = one_argument(argument, arg);
	for ( iClass = 0; iClass < 6; iClass++ )
	{
	    if ( toupper(arg[0]) == toupper(build_name[iClass][0])
	    &&   !str_prefix( arg, build_name[iClass] ))
	    {
		ch->build = iClass;
		break;
	    }
	}    
    
    if( iClass == 6 || !build_name[iClass] || build_name[iClass][0] == '\0')
        {
            send_to_buffer( "&zThat's not a build.\n\rWhat is it going to be?&w ", d );
            return;
        }

    case CON_GET_DROID:
   if(IS_DROID(ch))
   {
        argument = one_argument(argument, arg);
	for ( iDroid = 0; iDroid < 8; iDroid++ )
	{
	    if ( toupper(arg[0]) == toupper(droid_name[iDroid][0])
	    &&   !str_prefix( arg, droid_name[iDroid] ))
	    {
		ch->build = iDroid;
		break;
	    }
	}    
    
	if (iDroid == 8 ||  !droid_name[iDroid] || droid_name[iDroid][0] == '\0')
        {
            send_to_buffer( "&zThat's not a droid description.\n\rWhat is it going to be?&w ", d );
            return;
        }
   }
        break;
       
Post is unread #2 Dec 24, 2005, 8:49 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

As a general rule, even if you've now solved your problem we still like to keep the posts intact so that others can benefit from the information as well. Since you edited the topic asking for the post to be deleted, I am assuming you resolved your problem. Could you perhaps post what the solution was in case other people run into the same thing later?
       
Post is unread #3 Dec 24, 2005, 8:04 pm
Go to the top of the page
Go to the bottom of the page

Stan
Fledgling
GroupMembers
Posts23
JoinedNov 19, 2005

Ok, cool.
I never exactly got it working the way I wanted, I simply made it so that character height and build are random.
       
Pages:<< prev 1 next >>