On Wed, 6 Jan 1999, Andrew wrote: >I have written up a bit of code that is supposed to delete a room. It works >ok sometimes, >but other times it doesn't work at all. Sometimes it just does nothing, and >sometimes it >crashes the game. Here's the code - I know, it's awful... > >BTW, num_of_rooms is an external integer which is the number of rooms at >startup... > >void DeleteRoom( int room, struct char_data *ch) http://www.circlemud.org/~greerga/oasis2.pre.tar.gz genwld.c: delete_room() Have to remove the save list line though. >int is_room( int room_num ) >{ > int i, found = FALSE; > for(i = 0; i < num_of_rooms; i++) > { > if (world[i].number == room_num) > found = TRUE; > } > > return found; >} if (real_room(VNUM) != NOWHERE) { ... } -- George Greer, greerga@circlemud.org | Genius may have its limitations, but http://mouse.van.ml.org/ (mostly) | stupidity is not thus handicapped. http://www.van.ml.org/CircleMUD/ | -- Elbert Hubbard +------------------------------------------------------------+ | 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