Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Thu Jan 09, 2014 1:29 am   

Trigger help
 
Most of my triggers work just fine.
This one does not. What have I done wrong?
When someone gains a level this appears:

A Spectral Voice echoes 'XXYZZY has raised a level!!'

in the trigger:
The pattern shows:
A Spectral Voice echoes '%w has raised a level!!'
The text shows:
A Spectral Voice echoes 'XXYZZY has raised a level!!'

PATTERN MATCHES

in the script text is:
#SEND {grats %w}

Which is exactly what sends "You grats %w" instead of You grats XXYZZY

Help please!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Thu Jan 09, 2014 3:18 pm   
 
there is no need to wrap your command up in a #SEND command
_________________
Discord: Shalimarwildcat
Reply with quote
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Thu Jan 09, 2014 4:22 pm   
 
Ok, I will unwrap, but htat is what cmud did when it created the trigger.
Reply with quote
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Thu Jan 09, 2014 4:28 pm   
 
I have another trigger that is very similar, that is experiencing the same thing, it is not wrapped. it looks like this:
Pattern:
A Spectral Voice echoes '%w has joined the World!'

script text:
hug %w

it sends:
hug %w
instead of
hug name
_________________
Windows 10 64BIT Intel Core i7-4770K
CMUD 3.34 Pro
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Thu Jan 09, 2014 5:15 pm   
 
Oh, my mistake
the issue is using %w in the script
as a wildcard, its only use is in pattern matching
change it to:
hug %1
grats %1
_________________
Discord: Shalimarwildcat
Reply with quote
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Thu Jan 09, 2014 11:26 pm   
 
ok, ty, i'll try that
_________________
Windows 10 64BIT Intel Core i7-4770K
CMUD 3.34 Pro
Reply with quote
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Thu Jan 09, 2014 11:41 pm   
 
Nope :( it just sends Hug
the %1 is pink if that means anything.
_________________
Windows 10 64BIT Intel Core i7-4770K
CMUD 3.34 Pro
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Thu Jan 09, 2014 11:57 pm   
 
Aha, i missed that issue too.

In order for a segment of your pattern to be assigned to these anonymous variables, you need to wrap them in parrenthesis.


A Spectral Voice echoes '(%w) has raised a level!!'
_________________
Discord: Shalimarwildcat
Reply with quote
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Fri Jan 10, 2014 12:59 am   
 
Ahhhh, thats got it!!

ty!
_________________
Windows 10 64BIT Intel Core i7-4770K
CMUD 3.34 Pro
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net