 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Aug 01, 2007 7:44 pm
[1.34] Issues with spaces going missing in #EXEC |
I seem to recall others having this problem before, but I can't find a post about it now.
What happens is I'm losing spaces when using #EXEC on an expanded string list.
| Code: |
#ADDITEM general_items "unparry"
#ADDITEM general_items "parry head 100"
#EXEC %expandlist(@general_items, ";")
|
It comes out as "unparry" (good) and then "parry head100" (bad).
I get the same problem just doing #EXEC on the string literal, no function calls.
| Code: |
#EXEC "unparry;parry head 100"
|
I thought it was an issue with the semi-colon syntax, but it happens with just the second command, too.
| Code: |
#EXEC "parry head 100"
|
I tried closing the client and seeing if it fixed itself with a reset. No luck.
Anyone seen this one or have any helpful suggestions? |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Aug 01, 2007 8:18 pm |
There's definitely more going on here than meets the eye - both examples are working fine for me. It's not as helpful a comment as I'd like.
Are these problems happening in a blank session, too? |
|
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Aug 01, 2007 10:05 pm |
Unfortunately, no. I tried it in a blank session and it worked. Something happened to my package, I guess, and I have no idea what. It's not like I get a compilation error or anything obvious, so I was hoping someone else had a clue as to the subtleties of this occurrence.
|
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Aug 02, 2007 3:26 am |
If it's specific to a package or set of packages, though, it's possible (probable?) that Zugg'll have the tools to be able to find out what's wrong with them. Between it only happing with certain packages and it happening all the time, I think that's the better one.
|
|
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Thu Aug 02, 2007 1:54 pm |
Okay. It wasn't a corrupt package at all. I tracked it down to a glitch in an alias, so I consider this to be a bug in CMUD, albeit a very minor one with a simple workaround.
I made this alias to track parry weights:
| Code: |
#ALIAS parry($body_part, $amt) {
#SWITCH ($body_part == "") {
~parry
} ($amt == "") {
~parry $body_part 100
#ADDKEY to_parry $body_part 100
i_failsafe_parry
} {
~parry $body_part $amt
#ADDKEY to_parry $body_part $amt
i_failsafe_parry
}
} |
The command was always coming out as "parry head100" or "parry lleg50" without the space between the body part and weight value. Adding a quoted space between the parameters forces proper output (~parry $body_part" "$amt), so I'm glad for that, at least. (And it appeared on the #EXEC with a string literal because it was executing the alias, of course. Silly me for not realizing that sooner.) |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Aug 02, 2007 2:46 pm |
I'm pretty sure the bug with escaping aliases is on the bug list. In version 2 you can use #send instead to bypass the alias code.
|
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Aug 06, 2007 5:34 pm |
Looks like the problem only happens when the first word of the command is an existing alias. I've added this to the bug list.
|
|
|
|
 |
|
|
|