|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Sat Sep 08, 2007 3:23 pm
[2.03] <send> tags with | in - in #SUBs |
If you use #SUB to add <send> tags to create right-click menus, you will have this problem:-
Test code:
Code: |
Trigger pattern:
(SUB) (MXP User Send Test)$
Value:
1.
#SUB {"~<send '1|2|3'~>"%1"~</send~>" %2}
0000 PUSHSTRLOC 0016
0008 JUMP 0084
0016 LITERAL "<send '1|2|3'>"
0040 PARAMREF 1
0048 CONCAT
0052 STR '</send> '
0068 CONCAT
0072 PARAMREF 2
0080 CONCAT
0084 CMD substitute (1)
2. or:
#SUB {"<send '1|2|3'>"%1"</send>" %2}
0000 PUSHSTRLOC 0016
0008 JUMP 0084
0016 LITERAL "<send '1|2|3'>"
0040 PARAMREF 1
0048 CONCAT
0052 STR '</send> '
0068 CONCAT
0072 PARAMREF 2
0080 CONCAT
0084 CMD substitute (1)
3. or:
#SUB {"<send '1~|~2~|3'>"%1"</send>" %2}
0000 PUSHSTRLOC 0016
0008 JUMP 0084
0016 LITERAL "<send '1|2|3'>"
0040 PARAMREF 1
0048 CONCAT
0052 STR '</send> '
0068 CONCAT
0072 PARAMREF 2
0080 CONCAT
0084 CMD substitute (1)
4. or:
#SUB {<send '1|2|3'>%1</send> %2}
0000 PUSHSTRLOC 0016
0008 JUMP 0084
0016 LIST {"<send '1"|2|3'>}
0040 PARAMREF 1
0048 CONCAT
0052 STR '</send> '
0068 CONCAT
0072 PARAMREF 2
0080 CONCAT
0084 CMD substitute (1)
To test the problem:
#SHOW SUB MXP User Send Test |
Result with all four SUBs:
"SUB MXP User Send Test
Notice the extra " (double quote). If I click on SUB, this gets send to the mud:
1"
instead of 1. So an extra pair of quotes are getting inserted from somewhere, presumably because CMUD thinks it is a string list, and hasn't realised that the string list is itself within single, and optionally, double quotes. The syntax highlighter shows 1, 2 and 3 correctly, and the compiled code looks correct. In the case of 4, the compiled code looks like there will be a problem, but it is really invalid syntax anyway, so it's not surprising - I only tested that to check that the extra double quotes were not the ones that were in my code.
This problem is probably a different symptom of the same problem that is causing this symptom: [2.03Pro] Pipes in status bar
However, I can't find a workaround for this problem here, except for removing all the pipes (|), i.e. removing the right-click menu. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Sep 08, 2007 3:37 pm |
Mine attaches a single quote to the 1, but I still encounter this problem.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Sep 10, 2007 8:29 pm |
Added to bug list.
|
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Sat Sep 29, 2007 4:00 pm |
Confirmed as fixed in v2.04.
|
|
|
|
|
|
|
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
|
|