Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Caught in loop, char_died?
|
Caught in loop, char_died?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Tue 24 May 2005 10:27 PM (UTC) |
| Message
| Got home found the MUD was caught in a loop:
0x080de2e3 in char_died (ch=0xc857cc0) at handler.c:3882
3882 if ( ccd->ch == ch )
(gdb) bt
#0 0x080de2e3 in char_died (ch=0xc857cc0) at handler.c:3882
#1 0x080d426e in free_fight (ch=0x933e8c0) at fight.c:3216
#2 0x080d43c3 in stop_fighting (ch=0xc857cc0, fBoth=1 '\001') at fight.c:3254
#3 0x080d47bc in raw_kill (ch=0x933e8c0, victim=0xc857cc0) at fight.c:3463
#4 0x080d32c1 in damage (ch=0x933e8c0, victim=Variable "victim" is not available.
) at fight.c:2561
#5 0x08139dcb in do_jakai_flare (ch=0x933e8c0, argument=0xbfe5fbb9 "") at skills.c:7024
#6 0x08129146 in check_skill (ch=0x933e8c0, command=0xbfe5f76c "jakai", argument=0xbfe5fbb9 "") at skills.c:456
#7 0x080e22f1 in interpret (ch=0x933e8c0, argument=0xbfe5fbb9 "") at interp.c:492
#8 0x080b67ab in game_loop () at comm.c:972
#9 0x080b5b4c in main (argc=2, argv=0xbfe61114) at comm.c:340
Notice frame 4? I have never see that "variable is not available" before... Any ideas?
This is the jakai_flare loop:
for ( vch = first_char; vch; vch = vch_next )
{
vch_next = vch->next;
if ( !vch->in_room || ch == vch )
continue;
if ( vch->in_room == ch->in_room )
{
if ( is_safe( ch, vch, FALSE ) )
continue;
global_retcode = damage( ch, vch, number_range(80+get_curr_int(ch)+get_curr_wis(ch),
180+get_curr_int(ch)+get_curr_wis(ch)), gsn_jakai_flare );
}
Did I do something wrong there? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #1 on Sun 29 May 2005 05:27 AM (UTC) |
| Message
| | Is this loop of yours intended to affect only the room the PC is in, or any character anywhere on the mud? | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #2 on Sun 29 May 2005 06:36 PM (UTC) |
| Message
| | Any character in the room. Thus the room checks. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #3 on Mon 30 May 2005 12:46 AM (UTC) |
| Message
| In that case:
for ( vch = first_char; vch; vch = vch_next )
{
vch_next = vch->next;
vc_next should be getting set to vch->next_in_room instead of simply vch->next. Your loop is currently checking everyone in the world.
I don't know that this will solve your problem with it being available or not, but it will at least be doing what you asked of it. | | 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.
10,273 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top