Okay, now with all these odd problems, that deal with null values, etc, I start wondering if something seriously wrong with my MUD (see these posts: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4240 and http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4134 )
This is the latest problem:
Its null again...
Here's the (stock) code:
Its quite odd... Does any of this relate to the other problems? Right now, I'm just wondering why it crashed with this...
This is the latest problem:
#0 0x0812d32e in weather_update () at update.c:2464
2464 if(d->connected == CON_PLAYING &&
(gdb) bt
#0 0x0812d32e in weather_update () at update.c:2464
#1 0x0812c54d in update_handler () at update.c:2022
#2 0x080a9d66 in game_loop () at comm.c:690
#3 0x080a965d in main (argc=8, argv=0xbfffdf10) at comm.c:304
#4 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) print d
$1 = (struct descriptor_data *) 0x8359548
(gdb) print d->port
$2 = 1184
(gdb) print d->connected
$1 = 0
(gdb)
(gdb) print d->character
$2 = (struct char_data *) 0x0
Its null again...
Here's the (stock) code:
for(d = first_descriptor; d; d = d->next)
{
WEATHER_DATA *weath;
if(d->connected == CON_PLAYING &&
IS_OUTSIDE(d->character) &&
!NO_WEATHER_SECT(d->character->in_room->sector_type) &&
IS_AWAKE(d->character))
{
weath = d->character->in_room->area->weather;
if(!weath->echo)
continue;
set_char_color(weath->echo_color, d->character);
ch_printf(d->character, weath->echo);
}
}
Its quite odd... Does any of this relate to the other problems? Right now, I'm just wondering why it crashed with this...