I am using an older copy of the CircleMud base, and was curious if the issue I am about to describe has been solved in the latest TBA, or if someone is able to point me to where in the code I might address a specific crash related issue I have discovered.
Issue: When running a script with a wait period, if the %actor% being targeted by the script is not present, but is at the main menu of the game, it crashes the mud.
To be more clear about this in examples: Here is a short trigger snippet.
Code:
Name: 'TRAP: Shield of Honor', VNum: [17092], RNum: [ 897]
Trigger Intended Assignment: Objects
Trigger Type: Get , Numeric Arg: 100, Arg list: None
Commands:
return 0
%send% %actor% THIEF! You cannot steal the Shield of Honor!
%echoaround% %actor% Oops! %actor.name% just tried to grab the Shield of Honor...
wait 1s
%send% %actor% A blinding flash of silvery light engulfs you and suddenly you are sucked into a portal.
%echoaround% %actor% A blinding flash of silvery light engulfs %actor.name% and %actor.heshe% is sucked into a magical portal.
%teleport% %actor% 17098
wait 1 s
%force% %actor% look
%at% 17098 %echoaround% %actor% In a flash of light, %actor.name% is thrown violently from a portal & lies here with a dazed look on %actor.hisher% face.
wait 1s
%at% 17095 %echo% As quickly as it formed, the portal disappears back within the Shield of Honor.
halt
end
So, in this trigger for example, If by chance the player dies in that wait 1 s period, when the game goes to teleport that %actor%, it crashes. I've attempted identifiers such as if %actor%, and !%actor%, which solved it partially, but not totally. In instances where the arguments are placed, if a character is in game it works fine. If a character dies and disconnects immediately, the trigger ceases and does not crash. If a character dies and is at the main screen of the mud, it crashes. This got me thinking it has something to do with creating a way for the code to detect if a chars descriptor state is CON_PLAYING or not.
Has anyone looked at this, heard of this, have any ideas, etc? It's driving me nuts because I have a lot of triggers I want to use a wait period on to act upon a player, but I don't want to have an unstable mud.