| View previous topic :: View next topic |
| Author |
Message |
steveb
Joined: 10 Oct 2005 Posts: 11
|
Posted: Mon Apr 24, 2006 9:09 pm Post subject: Passing variables with semi-colons |
|
|
I've hit this problem before and found workarounds, but was wondering if there was a better way of doing this.. I'm trying to pass variables that contain semi-colons, but haven't had any luck. For example, I've got an alias that sets a variable so that it survives the current session and is carried over to the next.
| Code: | #alias {SetVar} {
#variable %1 %2;
#gts #variable %1 %2
} |
Now when I try to use it for something like walking around..
| Code: | SetVar {gotostore}{d2w4ne}
$gotostore |
That works. When the path gets trickier..
| Code: | SetVar {gotostore}{d;open door;w4ne}
$gotostore |
Things go bad.. gotostore stores 'd', and the client attempts to execute 'open door' and 'w4ne'.
I've tried tricks like {w\;open door\;d}, or even using \x3B in the variable. So far no luck.
Any tips on how to pass along variables with semi-colons?
Steve |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3281
|
Posted: Tue Apr 25, 2006 8:41 am Post subject: |
|
|
You'd want to use:
| Code: |
#alias {SetVar}
{
#variable {%1} {%2};
#gts #variable {%1} {%2}
}
|
This will still not work very well, though using \n instead of ; would get the job done.
SetVar {gotostore}{d\nopen door\nw4ne}
I'm not entirely sure why you don't use an alias though. |
|
| Back to top |
|
 |
|