|
Haldrik Wanderer
Joined: 03 Sep 2007 Posts: 88
|
Posted: 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? |
|
|
|
haiku Wanderer
Joined: 19 Nov 2004 Posts: 70
|
Posted: 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? |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Sun Sep 09, 2007 12:10 pm |
Does your trigger script compile properly?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
Haldrik Wanderer
Joined: 03 Sep 2007 Posts: 88
|
Posted: 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? |
|
|
|
haiku Wanderer
Joined: 19 Nov 2004 Posts: 70
|
Posted: Wed Sep 12, 2007 12:49 am |
When it comes to benchmarking, I'm a clueless noob.
|
|
|
|
|
|