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
Haldrik
Wanderer


Joined: 03 Sep 2007
Posts: 88

PostPosted: Sun Sep 09, 2007 5:27 am   

Debug Mode? Best way to trouble shoot?
 
Is there some way to force the mud to show when a trigger is activated?

My scripts are getting pretty complicated and its getting hard to tell what is messing up :P

Recently I've started adding #Echo to tell me which piece has been activated. The problem with this is it is very tedious, but I'm willing to do it.

With that said... the only problem with #echo is it does not work with #SW.

RandomExample:
Code:
#SW (@MobVar = 3)  {mobvar = @mobvar +1}
        (@mobvar = 2) {diraction =  @diraction1 + 1; #va diraction; #echo Script works}


Normally this would display the value of the variable diraction AND echo "Script works" instead it sends them both as a command to the mud.

What do you guys think?
Reply with quote
haiku
Wanderer


Joined: 19 Nov 2004
Posts: 70

PostPosted: Sun Sep 09, 2007 5:41 am   
 
#SHOW Variable: @Variable is what I use for debugging.

In Zmud you had the option to "show triggers", which I'm not sure how to do in cmud. Anyone?
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sun Sep 09, 2007 12:10 pm   
 
Does your trigger script compile properly?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Sep 09, 2007 12:11 pm   
 
I added a code tag to your post to preserve the spacing, which seems a little weird. But I constructed a test case using that exact script and it worked fine for me. There must be something interacting with it. Also, check the Compiled Code tab and make sure it's compiling.

Also, echo is normally the way I test triggers - I add many echoes to triggers when I write them, at different stages, and then remove them once I've confirmed that that part is working.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Haldrik
Wanderer


Joined: 03 Sep 2007
Posts: 88

PostPosted: Sun Sep 09, 2007 8:40 pm   
 
Fang,

Thanks for the code tag :P. And you are completely right. I just tested a couple of triggers out with #SW and #Echo. My triggers must have not been compiling correctly when I was trying to use the #Echo so i just assumed you couldnt use it with #SW.



Haiku- I may try that out, but its a lot of typing :P #va @variable is a lot quicker!! Unless its a huge performance hit?
Reply with quote
haiku
Wanderer


Joined: 19 Nov 2004
Posts: 70

PostPosted: Wed Sep 12, 2007 12:49 am   
 
When it comes to benchmarking, I'm a clueless noob.
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