Welcome to the Builder Academy

Question Crash bug - trigger

More
24 Nov 2015 19:53 - 25 Nov 2015 00:53 #5532 by cunning
Crash bug - trigger was created by cunning
I seem to have an issue with mob speech triggers. No matter what I do, it seems to crash on %name%. I am including one of the triggers.


#224
Librarian Speech~
0 G 100
~
if %actor.is_pc%
eval name %actor.name%

wait 2 sec
mecho The librarian eyes you briefly, sizing you up before beginning to speak.
wait 20 sec
mecho %name%, she begins, "I can help you with but little of what you seek."
wait 20 sec
say "The collection here is modest, and much of the material is of great age."
wait 20 sec
say "I am told that true scholars must go to the High Tower..."
wait 20 sec
say "I personally have not had a chance to examine their collection, but"
wait 20 sec
say "there is no doubt that they have much magical knowledge of worth."
wait 20 sec
mecho Turning back to the shelves, she falls silent.
end
Last edit: 25 Nov 2015 00:53 by cunning.

Please Log in or Create an account to join the conversation.

More
25 Nov 2015 05:15 #5533 by Parnassus
Replied by Parnassus on topic Crash bug - trigger
This doesn't look like a TBA trigger. Where is it coming from and are you trying to put it into TBA?

Also, why are you evaluating the name?

Please Log in or Create an account to join the conversation.

More
25 Nov 2015 14:08 #5534 by Rumble
Replied by Rumble on topic Crash bug - trigger
Hello all, in port Rio with my first decent internet access, less than a month left of deployment.

As Parna said there is no need to eval, just use:
mecho %actor.name%, she begins, "I can help you with but little of what you seek."

Also I would avoid creating variable names that match existing variables, I'm guessing that is what is causing the crash.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

More
26 Nov 2015 17:18 #5535 by Fizban
Replied by Fizban on topic Crash bug - trigger
As much as I see no reason to evaluate a name. And that's not a matter of personal preference, it's just a bad thing to do.

What is arguably a good idea is to do this:

set name %actor.name%

(I still wouldn't do that, since it makes little sense to add an extra line when you only have their name in the script once anyway.)

Evaluate uses more cpu time than set, and should only be used in the few scenarios where it is actually required.

For everything else set is superior.

Regardless of that though, I see no reason this should cause a crash.

Please Log in or Create an account to join the conversation.

Time to create page: 0.353 seconds