 |
FiendishX Wanderer
Joined: 19 Nov 2005 Posts: 53
|
Posted: Sat Apr 12, 2008 2:54 pm
broken syntax checker |
Is there a reason why the syntax checker chokes on the following line?
| Code: |
| #EXEC {#ALARM %concat(%1,%time( "hhnnsszzz")) +6 {#SHOW %1 @response_string}} |
The script works as intended, it's just really annoying to lose syntax highlighting for the whole script because of that one line that is only necessary because zMUD doesn't know how to make variable name alarms. |
|
|
|
 |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Apr 12, 2008 7:01 pm |
You should be able to re-write it to this and not kill the syntax checker.
| Code: |
| #EXEC {%concat("#ALARM ",%1,%time( "hhnnsszzz")," {+6} {#SHOW {",%1," @response_string}}")} |
I was only able to test this in CMUD though so it still may not work. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
 |
FiendishX Wanderer
Joined: 19 Nov 2005 Posts: 53
|
Posted: Sat Apr 12, 2008 7:24 pm |
| Arminas wrote: |
You should be able to re-write it to this and not kill the syntax checker.
| Code: |
| #EXEC {%concat("#ALARM ",%1,%time( "hhnnsszzz")," {+6} {#SHOW {",%1," @response_string}}")} |
I was only able to test this in CMUD though so it still may not work. |
Well that actually does not work properly. It fixes the syntax checker but breaks the function of that line of the script slightly. The whole reason for having the variable name is that otherwise if the trigger happens in rapid succession it sends the second response twice (the response string changes each time) instead of both the first and second responses.
Your suggestion did not accomplish sending both first and second responses for some reason.
This does work, however:
| Code: |
#EXECUTE {%concat( "#ALARM ", %1, %time( "hhnnsszzz"), " +6 {#SHOW ", %1, " ", @response_string, "}")}
|
So thanks for the idea anyway. |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Apr 13, 2008 5:47 pm |
It's ou an uncommon problem; there're various situations where this can happen. You'll find that this command probably won't export to text properly, which is part of the reason why cmud's checker uses the parser itself and why it exports to xml.
|
|
|
|
 |
|
|
|