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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Mar 25, 2008 2:36 am   

Using local variables with query
 
The following code snippet works:
Code:

vnum = %mapvnum(%i)
$qr = %query( &RoomName = %roomname(@vnum), All|ma)

The local variable $qr will contain an appropriate string list.
However, this returns a null:
Code:

$vnum = mapvnum(%i)
$qr = %query( &RoomName = %roomname($vnum), All|ma)

or this:
Code:

$vnum = %mapvnum(%i)
$name = %roomname($vnum)
$qr = %query( &RoomName = $name, All|ma)


Am I doing something wrong or is there a problem?
_________________
Sic itur ad astra.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Tue Mar 25, 2008 3:04 am   
 
I believe this has been confirmed already as a bug (or undocumented feature). Try doing a search for suggestions or related posts.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Mar 25, 2008 8:30 am   
 
I believe that it works if you concatenate it explicitly with %concat.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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