 |
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Mon Aug 20, 2007 11:00 am
Illegal token: At row 7 col 37 |
I have set up an alias to skin. For use in Dragonrealms. The strange thing is that even though It seems that I have the proper syntax, the package editor is telling me I do not.
The alias content is below.
#var creature %1
glance
#Temp {You glance down to see [%w%s%p] &Weap in your right hand} {sheath;wield my knife}
#temp {You draw out your skinning knife} {skin @creature;stow left}
#temp {You put your|Stow what~?} {sheath]
#temp {You sheath the skinning knife} {search @creature}
#temp {You search} {wield my @Weap} |
|
_________________ You can pick your nose. You can pick your friends... but you can't pick your friends nose.
~Arwin Hochhauser |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon Aug 20, 2007 11:25 am |
Your third #temp ends with ] instead of }. Could that be the problem?
Also, I think a couple of your patterns may need tweaking... |
|
|
 |
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Mon Aug 20, 2007 11:26 am |
Quote: |
Also, I think a couple of your patterns may need tweaking... |
How so?
EDIT: You were correct on the ]. Strange that it stated the illegal token was on row 7 when it was actualy on row 5. |
|
_________________ You can pick your nose. You can pick your friends... but you can't pick your friends nose.
~Arwin Hochhauser |
|
|
 |
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Mon Aug 20, 2007 11:46 am |
You were correct about the tweaks as well. I was missing a bit in the way of spelling. The working alias is below if anyone is interested. I doubt that, however. :p
#var creature %1
glance
#Temp {You glance down to see [%w%s%p] &weap in your right hand} {sheath;wield my knife}
#temp {You draw out your skinning knife} {skin;stow left}
#temp {{You put your|Stow what}} {sheath}
#temp {You sheathe the skinning knife} {search @creature}
#temp {You search} {wield my @weap} |
|
_________________ You can pick your nose. You can pick your friends... but you can't pick your friends nose.
~Arwin Hochhauser |
|
|
 |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Mon Aug 20, 2007 1:58 pm |
I'm pretty sure the reason it was on row seven is because you have multiple statements on some lines. If you count each ; as a new line, you should get to seven.
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Aug 20, 2007 2:15 pm |
Ctrl-K is putting the cursor in the wrong place because of it, though. I think this counts as a bug.
|
|
|
 |
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Mon Aug 20, 2007 2:36 pm |
Ctrl+k? This is a shortcut i've not used nor am I familiar with it.
|
|
_________________ You can pick your nose. You can pick your friends... but you can't pick your friends nose.
~Arwin Hochhauser |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Aug 20, 2007 2:45 pm |
Ctrl-K is the shortcut for the Syntax Check menu option. It moves the cursor to the syntax error and displays the error details in the main Script panel of whatever setting you're in that has the error.
|
|
|
 |
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Mon Aug 20, 2007 3:34 pm |
Thanks for the information Fang. This should make it easier for me in the future.
I am notorious for making stupid syntax errors.  |
|
_________________ You can pick your nose. You can pick your friends... but you can't pick your friends nose.
~Arwin Hochhauser |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Aug 20, 2007 5:36 pm |
It's actually not counting the ; in the line count. The parser really does think the error is at row 7, col 37. That is because it's the end of the script. When you have your ] at the end of "sheath", then the parser thinks that the following #temp lines are additional commands within the { that you started at the beginning of "sheath". So, the syntax error is that it never sees the closing } character to end the script. The "illegal token" error is sort of a "catch all" error message. Maybe it should just say "syntax error" like it used to.
But basically it's complaining because if doesn't see the closing } for the { that is at the beginning of "sheath". It has no way to know that the ] should be a }. It just thinks you are trying to send "sheath]" to the MUD, which is perfectly valid.
So, nothing I can do about this one. |
|
|
 |
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Mon Aug 20, 2007 5:45 pm |
Zugg wrote: |
It's actually not counting the ; in the line count. The parser really does think the error is at row 7, col 37. That is because it's the end of the script. When you have your ] at the end of "sheath", then the parser thinks that the following #temp lines are additional commands within the { that you started at the beginning of "sheath". So, the syntax error is that it never sees the closing } character to end the script. The "illegal token" error is sort of a "catch all" error message. Maybe it should just say "syntax error" like it used to.
But basically it's complaining because if doesn't see the closing } for the { that is at the beginning of "sheath". It has no way to know that the ] should be a }. It just thinks you are trying to send "sheath]" to the MUD, which is perfectly valid.
So, nothing I can do about this one. |
I think my brain just died because I didn't understand most of that. The problem is solved and I have no need to understand anything but the last sentence.  |
|
_________________ You can pick your nose. You can pick your friends... but you can't pick your friends nose.
~Arwin Hochhauser |
|
|
 |
|
|