%force% %actor% look crashes tbaMUD

Login to reply  Page: « < 1 of 1 > »
18 Dec 2009 - 10:422173
%force% %actor% look crashes tbaMUD
Here is my code. It's probably messy and horrible, but I can't find any reason for it to crash the game.

Name: 'test',  VNum: [28701], RNum: [ 1382]
Trigger Intended Assignment: Mobiles
Trigger Type: Command , Numeric Arg: 100, Arg list: north
Commands:
set actor_room %actor.room%
set this_room %actor_room.vnum%
%echo% this_room = %actor_room.vnum%
set new_room %this_room.north(vnum)%
%echo% new_room = %this_room.north(vnum)%
wait 1 sec
%teleport% %actor% %this_room.north(vnum)%
%force% %actor% look
The last line (%force% %actor% look) crashes the MUD (yes, it's that line, if I remove it the script works fine).
gdb output follows:
Program received signal SIGSEGV, Segmentation fault.
0x0045eba9 in do_mforce (ch=0x112a2d10, argument=0x20df26 "  }1 look", cmd=0,
    subcmd=0) at dg_mobcmd.c:670
670         if (ch->desc && (GET_LEVEL(ch->desc->original) < LVL_IMPL))
(gdb) up
#1  0x00493c5a in script_command_interpreter (ch=0x112a2d10,
    arg=0x20df20 "mforce  }1 look") at interpreter.c:402
402       ((*mob_script_commands[i].command_pointer) (ch, line, 0,
(gdb) up
#2  0x00469fb4 in script_driver (go_adress=0x20e168, trig=0x112ce888, type=0,
    mode=1) at dg_scripts.c:2662
2662                if (!script_command_interpreter((char_data *) go, cmd))
(gdb) up
#3  0x0046a5d6 in trig_wait_event (event_obj=0x112d2ef8) at dg_scripts.c:749
749       script_driver(&go, trig, type, TRIG_RESTART);
(gdb) up
#4  0x0045c10d in event_process () at dg_event.c:112
112         if ((new_time = (the_event->func)(the_event->event_obj)) > 0)
(gdb) up
#5  0x0044a551 in heartbeat (heart_pulse=10405) at comm.c:938
938       event_process();
(gdb) up
#6  0x0044dfb8 in game_loop (local_mother_desc=3) at comm.c:905
905           heartbeat(++pulse);
(gdb) up
#7  0x0044ef1b in main (argc=1, argv=0x10411c00) at comm.c:504
504       game_loop(mother_desc);
(gdb) up
Initial frame selected; you cannot go up.
Looks like it loses track of %actor% for some reason.
Any ideas?

PS. Oh, and other %force% %actor% look scripts work just fine (e.g. tstat 100).


18 Dec 2009 - 10:562174
Unable to reproduce the crash on TBA, it works as it should. You could throw in a return 0 to prevent the north command from being sent to the MUD. What version of tbaMUD are you running?


__________________
Rumble
The Builder Academy
tbamud.com 9091
18 Dec 2009 - 11:342175
Quote Rumble:
What version of tbaMUD are you running?

Hm, this is getting interesting. I've just reinstalled SVN revision 199 from scratch, running cygwin.
Still getting this crash. gdb output is identical.

Update: Um, did I mention that this script was intended to be attached to the player rather than a mobile? I don't think I did. My bad.
Update 2: Shouldn't have used "%force% %actor%" in a player-attached script. Simply "look" have sufficed. :) Problem solved.



Last edited by Rovlad (18 Dec 2009 - 12:19)
18 Dec 2009 - 13:062176
Suggestion:


if %self% == %actor%


__________________
Login to reply  Page: « < 1 of 1 > »