extended wildcard issue

Posted by Magellan on Mon 25 Sep 2017 04:13 AM — 4 posts, 18,840 views.

#0
I am having trouble to get this trigger to fire correctly. I've been working at it for a while, pouring over the forums looking for likely fixes. anyway the issue is this:


Debug(.*?) on combat_round :: (.*?) is successfully hitting (.*?) for (.*?) actual damage.

FPCDPS = GetVariable ("FPCDPS")
Note ("combat %2, %4, @FPCDPS")
if %2 == "Magellan" then 
SetVariable ("PCDPS", tonumber (GetVariable ("PCDPS")) + %4)
else
Note ("option 2")
end
Execute ("mathpcdps")


So when %2 equals Magellan the trigger fires as intended. However if %2 is something else i have an error. I believe the error may be related to how the "other" is being represented, which is this:


_1055134_623666 name1 name2 name3


I get the error:


Compile error
World: NDAedit
Immediate execution
[string "Trigger: "]:3: 'then' expected near 'name1'


any help would be appreciated. i am trying to figure out my dps vs the dps of the NPC if this helps. thanks.
USA Global Moderator #1
Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


Quote:
when %2 equals Magellan the trigger fires as intended

It doesn't do what you think it does, though. You almost certainly want "%2", not just %2.
Amended on Tue 26 Sep 2017 12:30 AM by Fiendish
Australia Forum Administrator #2
Template:faq=32
Please read the MUSHclient FAQ - point 32.
#3
that was what i was missing. thanks. i'll try to post it the right way next time Fiendish.