No... It's not a bug. The highest room-# is equal to top_of_world - 1. In OLC you have a lot of defines that are like top_of_world you have defines like NUM_ROOM_FLAGS, NUM_ITEM_FLAGS, etc... All of them are checked the same way as with top_of world: for (counter = 0; counter < NUM_ROOM_FLAGS; counter++) { <--- Is what the olc uses to display all the avaliable room flags in the olc to the builder's screen. if this would've been: for (counter = 0; counter <= NUM_ROOM_FLAGS; counter++) { then you'd end up with an UNDEFINED flagg last instead of the last existing flag. The same is with top_of world, you'd end up checking a room that doesn't even exist, which is very bad to the health of your MUD. Hope this clears it up a bit :) >From: Andrey Fidrya <andrey@ALEX-UA.COM> >Reply-To: Circle Discussion List <CIRCLE@post.queensu.ca> >To: CIRCLE@post.queensu.ca >Subject: top_of_world >Date: Sat, 4 Dec 1999 20:36:28 +0300 >MIME-Version: 1.0 >From owner-circle@post.queensu.ca Sat Dec 04 11:52:01 1999 >Received: from [130.15.126.6] by hotmail.com (3.2) with ESMTP id >MHotMailBA12BA08006FD82197E4820F7E06A0EE1; Sat Dec 04 11:44:54 1999 >Received: from post.queensu.ca (post [130.15.126.6])by post.queensu.ca >(8.9.3/8.9.3) with ESMTP id OAA21533;Sat, 4 Dec 1999 14:20:13 -0500 (EST) >Received: from POST.QUEENSU.CA by POST.QUEENSU.CA (LISTSERV-TCP/IP release > 1.8d) with spool id 158869 for CIRCLE@POST.QUEENSU.CA; Sat, 4 Dec > 1999 14:20:12 -0500 >Received: from avenger.alex-ua.com (unused36.alex-ua.com [195.5.22.36] (may >be forged)) by post.queensu.ca (8.9.3/8.9.3) with ESMTP id >OAA21521 for <circle@post.queensu.ca>; Sat, 4 Dec 1999 14:20:09 >-0500 (EST) >Received: from locust ([195.5.27.85]) by avenger.alex-ua.com (8.8.8/8.8.8) >with SMTP id VAA22705; Sat, 4 Dec 1999 21:19:35 +0200 (EET) >(envelope-from andrey@alex-ua.com) >X-Priority: 3 >X-MSMail-Priority: Normal >X-Mailer: Microsoft Outlook Express 4.72.3110.5 >X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 >Approved-By: Andrey Fidrya <andrey@ALEX-UA.COM> >Message-ID: <000401bf3e84$12bc51c0$6f003c0a@locust> >Sender: Circle Discussion List <CIRCLE@post.queensu.ca> >Comments: cc: bugs@circlemud.org > >Is this a bug? >(act.wizard.c): >case 6: > strcpy(buf, "Death Traps\r\n-----------\r\n"); > for (i = 0, j = 0; i <= top_of_world; i++) > if (ROOM_FLAGGED(i, ROOM_DEATH)) >[...] >case 7: > strcpy(buf, "Godrooms\r\n--------------------------\r\n"); > for (i = 0, j = 0; i < top_of_world; i++) >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ should be <=? > >There's another one in spec_assign.c: >void assign_rooms(void) >{ > int i; > > ASSIGNROOM(3030, dump); > ASSIGNROOM(3031, pet_shops); > > if (dts_are_dumps) > for (i = 0; i < top_of_world; i++) >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > if (ROOM_FLAGGED(i, ROOM_DEATH)) >world[i].func = dump; >} > > >Andrey > > > +------------------------------------------------------------+ > | Ensure that you have read the CircleMUD Mailing List FAQ: | > | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | > +------------------------------------------------------------+ ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST