Re: Trains code

From: George (greerga@CIRCLEMUD.ORG)
Date: 11/30/97


On Sun, 30 Nov 1997 SirHomerJ@AOL.COM wrote:

>transroom = real_room(501);
>station = real_room(10000);
[...then...]
>world[transroom].dir_option[wdoor]->to_room = station;
>world[station].dir_option[edoor]->to_room = transroom;

If neither of those rooms exist, you're accessing array index -1 which is
not good.  You should check transroom and station room to see if they are
-1 first.  If so, make those two rooms or change the numbers.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST