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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Strange Bug With Online Building

Strange Bug With Online Building

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


Posted by Kelsid   USA  (35 posts)  [Biography] bio
Date Mon 29 Oct 2001 09:00 AM (UTC)
Message
Im kinda curious if anyone else picked up on this, I encountered this while creating a new object value (I call it value6) Specifically for the objects level. I noticed a fairly large bug in the fold_area function in build.c


The code as it exists now in 1.4a is the following:

in function void fold_area:

 /* save objects */
    fprintf( fpout, "#OBJECTS\n" );
    for ( vnum = tarea->low_o_vnum; vnum <= tarea->hi_o_vnum; vnum++ )
    {
	
	if ( (pObjIndex = get_obj_index( vnum )) == NULL )
	  continue;
	if ( install )
	  xREMOVE_BIT( pObjIndex->extra_flags, ITEM_PROTOTYPE );
	fprintf( fpout, "#%d\n",	vnum				);
	fprintf( fpout, "%s~\n",	pObjIndex->name			);
	fprintf( fpout, "%s~\n",	pObjIndex->short_descr		);
	fprintf( fpout, "%s~\n",	pObjIndex->description		);
	fprintf( fpout, "%s~\n",	pObjIndex->action_desc		);
	if ( pObjIndex->layers )
	  fprintf( fpout, "%d %s %d %d\n",	pObjIndex->item_type,
				print_bitvector(&pObjIndex->extra_flags),
						pObjIndex->wear_flags,
						pObjIndex->layers	);
	else
	  fprintf( fpout, "%d %s %d %d\n",	pObjIndex->item_type,
				print_bitvector(&pObjIndex->extra_flags),
						pObjIndex->wear_flags,
						pObjIndex->layers	);

	val0 = pObjIndex->value[0];
	val1 = pObjIndex->value[1];
	val2 = pObjIndex->value[2];
	val3 = pObjIndex->value[3];
	val4 = pObjIndex->value[4];
	val5 = pObjIndex->value[5];
/* Added for Object Level support -Kelsid */
        val6 = pObjIndex->value[6];



The only problem with this is in the values... see it saves the pObjectIndex->value, not the obj->value. When you oset something, you normally change the obj->value (Unless its a prototype object). Its possible that this is done on purpose and really shouldnt be doing things this way. Im posting this just in case any users out there are using non-prototype areas (Ones that are in the area.lst file) and are wondering why when they oset an object,then fold the area it dosnt save.


Hope this helps with some of the mystery.

-Kelsid

-Kelsid
[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.


6,941 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]