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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Shattuc
Beginner


Joined: 30 May 2007
Posts: 13

PostPosted: Tue Oct 30, 2007 4:36 am   

script issues.
 
now, when I test this in the test section of triggers it puts the correct value in the correct places, however, when I try it in the mud it only captures the first part of the string it needs to capture.

here's the script.

the trigger part.
It would cost you (*) xp and (*) to raise (*) from level * to (*).

the variable part.
#var mygoal %1
#var costi %2
#var skils %3
#var lvlgoal %4

now I normally use characters that are trained in a part of the world where the money format is $12.34

if I use this line to test the trigger in Zmud:
It would cost you 162804 xp and LC 4|8|6 1/4 to raise magic.spells from level 5 to 50.
the variable output is:
%1 : 162804
%2 : LC 4|8|6 1/4
%3 : magic.spells
%4 : 50

however, when I enter the line in the mud to trigger this output from the mud:
It would cost you 162804 xp and LC 4|8|6 1/4 to raise magic.spells from level 5 to 50.
the variables stored is:
%1 : 162804
%2 : LC
%3 : magic.spells
%4 : 50

I need to know how to force zmud to capture the whole string between 'xp and' & 'to raise'
please help me, wits end coming soon.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Oct 30, 2007 4:43 am   
 
It is a good practice to use limited wildcards whenever possible. Also surrounding parameters in proper delimiters it necessary. While it wouldn't affect the assignments for mygoal, skills,and lvlgoal; it was the source of trouble with costi. You will likely find that variable has some garbage in its default value, and you may have some screwy classes and duplicate variables because of the lack of delimeters.

the trigger part.
It would cost you (%d) xp and (*) to raise (*) from level %d to (%d).

the variable part.
#var mygoal {%1}
#var costi {%2}
#var skils {%3}
#var lvlgoal {%4}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Shattuc
Beginner


Joined: 30 May 2007
Posts: 13

PostPosted: Tue Oct 30, 2007 4:51 am   
 
awesome, thank you so much. I've been hurting my brain for a few hours before posting.
that fixed it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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