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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Running the server
. . -> [Subject]  DBSaga 2.0 [act_move.o] Error 1

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

DBSaga 2.0 [act_move.o] Error 1

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Krenos   (4 posts)  [Biography] bio
Date Sat 11 Aug 2012 08:05 PM (UTC)  quote  ]
Message
I am running my server from a VPS trying to do Make and this is where it ends:


act_move.c
act_move.c: In function âgenerate_exitâ:
act_move.c:653:22: error: lvalue required as left operand of assignment
act_move.c: In function âdo_climbâ:
act_move.c:2401:7: warning: variable âfoundâ set but not used [-Wunused-but-set-variable]
act_move.c: In function âdo_enterâ:
act_move.c:2432:7: warning: variable âfoundâ set but not used [-Wunused-but-set-variable]
act_move.c: In function âdo_leaveâ:
act_move.c:2471:7: warning: variable âfoundâ set but not used [-Wunused-but-set-variable]
make[1]: *** [act_move.o] Error 1
make[1]: Leaving directory `/home/FTP-shared/upload/dbs/src'
make: *** [all] Error 2



I am currently learning to code for my own personal uses, but I am already paying for the server and i really want to get this up and running so my team can start work on the Mud while I learn.

Any help would be appreciated, i have had other smaug muds on here working and would like to get this up and running.
[Go to top] top

Posted by Krenos   (4 posts)  [Biography] bio
Date Reply #1 on Sat 11 Aug 2012 08:05 PM (UTC)  quote  ]

Amended on Sat 11 Aug 2012 08:30 PM (UTC) by Krenos

Message
Offending bits of code[Specific lines in bold and underlined:

/*
 * create a 'virtual' room					-Thoric
 */
ROOM_INDEX_DATA *generate_exit( ROOM_INDEX_DATA *in_room, EXIT_DATA **pexit )
{
	EXIT_DATA *xit, *bxit;
	EXIT_DATA *orig_exit = (EXIT_DATA *) * pexit;
	ROOM_INDEX_DATA *room, *backroom;
	int brvnum;
	int serial;
	int roomnum;
	int distance = -1;
	int vdir = orig_exit->vdir;
	sh_int hash;
	bool found = FALSE;

	if ( in_room->vnum > MAX_VNUMS )	/* room is virtual */
	{
		serial = in_room->vnum;
		roomnum = in_room->tele_vnum;
		if ( (serial & MAX_VNUMS) == orig_exit->vnum )
		{
			brvnum = serial >> 16;
			--roomnum;
			distance = roomnum;
		}
		else
		{
			brvnum = serial & MAX_VNUMS;
			++roomnum;
			distance = orig_exit->distance - 1;
		}
		backroom = get_room_index( brvnum );
	}
	else
	{
		int r1 = in_room->vnum;
		int r2 = orig_exit->vnum;

		brvnum = r1;
		backroom = in_room;
		serial = (UMAX( r1, r2 ) << 16) | UMIN( r1, r2 );
		distance = orig_exit->distance - 1;
		roomnum = r1 < r2 ? 1 : distance;
	}
	hash = serial % 64;

	for ( room = vroom_hash[hash]; room; room = room->next )
		if ( room->vnum == serial && room->tele_vnum == roomnum )
		{
			found = TRUE;
			break;
		}
	if ( !found )
	{
		CREATE( room, ROOM_INDEX_DATA, 1 );
		room->area	= in_room->area;
		room->vnum	= serial;
		room->tele_vnum	= roomnum;
		room->sector_type = in_room->sector_type;
		room->room_flags = in_room->room_flags;
		decorate_room( room );
		room->next	= vroom_hash[hash];
		vroom_hash[hash] = room;
		++top_vroom;
	}
	if ( !found || (xit = get_exit(room, vdir)) == NULL )
	{
		xit = make_exit(room, orig_exit->to_room, vdir);
		xit->keyword	= STRALLOC( "" );
		xit->description	= STRALLOC( "" );
		xit->key	= -1;
		xit->distance = distance;
	}
	if ( !found )
	{
		bxit = make_exit(room, backroom, rev_dir[vdir]);
		bxit->keyword	= STRALLOC( "" );
		bxit->description	= STRALLOC( "" );
		bxit->key	= -1;
		if ( (serial & MAX_VNUMS) != orig_exit->vnum )
			bxit->distance = roomnum;
		else
		{
			EXIT_DATA *tmp = get_exit( backroom, vdir );
			int fulldist = tmp->distance;

			bxit->distance = fulldist - distance;
		}
	}
	(EXIT_DATA *) pexit = xit;
	return room;
}


/*
 * "Climb" in a certain direction.				-Thoric
 */
void do_climb( CHAR_DATA *ch, char *argument )
{
	EXIT_DATA *pexit;
	bool found;

	found = FALSE;
	if ( argument[0] == '\0' )
	{
		for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
			if ( IS_SET( pexit->exit_info, EX_xCLIMB ) )
			{
				move_char( ch, pexit, 0 );
				return ;
			}
		send_to_char( "You cannot climb here.\n\r", ch );
		return ;
	}

	if ( (pexit = find_door( ch, argument, TRUE )) != NULL
	     && IS_SET( pexit->exit_info, EX_xCLIMB ))
	{
		move_char( ch, pexit, 0 );
		return ;
	}
	send_to_char( "You cannot climb there.\n\r", ch );
	return ;
}


/*
 * "enter" something (moves through an exit)			-Thoric
 */
void do_enter( CHAR_DATA *ch, char *argument )
{
	EXIT_DATA *pexit;
	bool found;

	found = FALSE;
	if ( argument[0] == '\0' )
	{
		for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
			if ( IS_SET( pexit->exit_info, EX_xENTER ) )
			{
				move_char( ch, pexit, 0 );
				return ;
			}
		if ( ch->in_room->sector_type != SECT_INSIDE && IS_OUTSIDE(ch) )
			for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
				if ( pexit->to_room && (pexit->to_room->sector_type == SECT_INSIDE
				                        || xIS_SET(pexit->to_room->room_flags, ROOM_INDOORS)) )
				{
					move_char( ch, pexit, 0 );
					return ;
				}
		send_to_char( "You cannot find an entrance here.\n\r", ch );
		return ;
	}

	if ( (pexit = find_door( ch, argument, TRUE )) != NULL
	     && IS_SET( pexit->exit_info, EX_xENTER ))
	{
		move_char( ch, pexit, 0 );
		return ;
	}
	send_to_char( "You cannot enter that.\n\r", ch );
	return ;
}


/*
 * Leave through an exit.					-Thoric
 */
void do_leave( CHAR_DATA *ch, char *argument )
{
	EXIT_DATA *pexit;
	bool found;

	found = FALSE;
	if ( argument[0] == '\0' )
	{
		for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
			if ( IS_SET( pexit->exit_info, EX_xLEAVE ) )
			{
				move_char( ch, pexit, 0 );
				return ;
			}
		if ( ch->in_room->sector_type == SECT_INSIDE || !IS_OUTSIDE(ch) )
			for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
				if ( pexit->to_room && pexit->to_room->sector_type != SECT_INSIDE
				     && !xIS_SET(pexit->to_room->room_flags, ROOM_INDOORS) )
				{
					move_char( ch, pexit, 0 );
					return ;
				}
		send_to_char( "You cannot find an exit here.\n\r", ch );
		return ;
	}

	if ( (pexit = find_door( ch, argument, TRUE )) != NULL
	     && IS_SET( pexit->exit_info, EX_xLEAVE ))
	{
		move_char( ch, pexit, 0 );
		return ;
	}
	send_to_char( "You cannot leave that way.\n\r", ch );
	return ;
}

[Go to top] top

Posted by Nick Gammon   Australia  (18,769 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 12 Aug 2012 03:17 AM (UTC)  quote  ]
Message
Krenos said:

Offending bits of code[Specific lines in bold and underlined:

/*
 * create a 'virtual' room					-Thoric
 */
ROOM_INDEX_DATA *generate_exit( ROOM_INDEX_DATA *in_room, EXIT_DATA **pexit )
{

	(EXIT_DATA *) pexit = xit;
	return room;
}



SmaugFuss has that line as:


	*pexit = xit;



As for the others, if it says "found" is not used, delete the line where it is declared.

- Nick Gammon

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


645 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]