|
cypren Wanderer
Joined: 03 Nov 2000 Posts: 59
|
Posted: Wed Feb 07, 2007 10:21 am
[1.24] Special variables unusable in :<window>:#cmd |
Local and MXP variables seem to be unusable in the multiplaying ":<windowname>:<command>" construct as the window name. I understand that they are unusable in the command context (since it is executed relative to the target window and its variable scope), but it seems they should be usable for the target window name at least.
Assuming the MUD has defined the "windowname" entity or passed an MXP tag to an MXP trigger with the "windowname" parameter, the constructs:
Code: |
:%mxp.windowname:#command
:%mud.windowname:#command
$tempvar = "mywindow"
:$tempvar:#command |
do not work in any situation that I can find.
Standard variables seem to work just fine in this context, so the current workaround is:
Code: |
tempvar = %mxp.windowname
:@tempvar:#command |
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Feb 07, 2007 10:42 am |
Confirmed.
|
|
|
|
cypren Wanderer
Joined: 03 Nov 2000 Posts: 59
|
Posted: Sun Feb 11, 2007 12:49 am |
Addendum: variables referenced by explicit package context cannot be used in this example either, such as:
Code: |
:@//myOtherPackage/myClass/myVar:#SHOW Hi |
Edit: Addendum to the addendum: This appears to be a problem with syntax, as opposed to (for example) variables from outside the trigger scope being unusable; if you prefix this line by changing the default class context, it will work just fine:
Code: |
#VAR myVar "mySecondWindow" _nodef {//myOtherPackage/myClass}
#CLASS //myOtherPackage/myClass
:@//myOtherPackage/myClass/myVar:#SHOW Hi |
|
|
|
|
|
|