|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Wed Sep 07, 2005 4:29 am
MXP + <send> error? |
My trigger works fine that was it should. But the editor says there is an error where the first " is.
Whats up with that?
Code: |
#MXP <send "pm has @TNL until his next level">@TNL</send>
^ syntax error |
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Sep 07, 2005 8:04 am |
The Syntax Checker can be extremely picky. This is because zScript has numerous well defined rules for how syntax looks, and nearly as many exceptions. #MXP is in the exceptions category. You can use single quotes ' here to make the checker happy.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Sep 07, 2005 4:07 pm |
#MXP, like any command, expects it's arguments to be surrounded by {} or quotes. So try:
Code: |
#MXP {<send "pm has @TNL until his next level">@TNL</send>} |
and see if that helps. Haven't tested it, but without the {} or quotes the picky syntax checker will certainly have trouble with it. |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Wed Sep 07, 2005 5:44 pm General Rule of Thumb |
That got the checker to stop complaining.
I just copied the sample in the help file "Using MXP" and edited it.
Could you add in the {}'s ?
(It won't help me cause I know now but someone might not know) |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Thu Sep 08, 2005 1:48 am Interesting |
While changing the code did fix the problem it kinda did something wierd
#MXP {<send "pm has @TNL until his next level">@TNL</send>}
My output now is >{123456789} with the number being what is stored in @TNL and only the number is the SEND command doing the pm. But shouldn't the {} be parsed out? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Sep 08, 2005 1:54 am |
I recommend using the quote character to get the syntax checker to stop complaining. Works like a champ, and no extra characters to clutter up your mxp stuff.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Thu Sep 08, 2005 2:17 am |
Using a " on either side does the same
"123456789" with the middle being link. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Sep 08, 2005 8:08 am |
#MXP "<send 'pm has @TNL until his next level'>@TNL</send>"
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Thu Sep 08, 2005 4:24 pm |
Same thing, has the quotes around the output. > "123"
Using the {} allowed the @TNL to actually register as a variable that can be hovered over and everything.
Don't worry about it, it is just a visual thing. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Sep 08, 2005 8:29 pm |
Quote: |
Using a " on either side does the same
"123456789" with the middle being link.
|
no, not quotes. The quote character, tilde (~) by default. When Zugg says that you don't need to quote MXP tags and such using the #MXP command, he only means that within some kind of bracketing or quotes (double or single). If you forego the quotes, you need to include the quote character (~) to let ZMud know how to handle the now-illegal tag bracket characters (less than and greater than).
The reason I recommended this is because quotes can be interfered with by quotes-related Preferences. If Strip Quotes is not checked, using " and possibly ' will result in extra characters surrounding the MXP link. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Thu Sep 08, 2005 9:08 pm |
#MXP ~<send "pm has @TNL until his next level">@TNL</send>
It did indeed work like a champ! (Quote character indeed, I would never have thought in a million years ~) |
|
|
|
|
|