Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
cypren
Wanderer


Joined: 03 Nov 2000
Posts: 59

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Feb 07, 2007 10:42 am   
 
Confirmed.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
cypren
Wanderer


Joined: 03 Nov 2000
Posts: 59

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net