 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: 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. |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: 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.
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Mar 25, 2008 8:30 am |
I believe that it works if you concatenate it explicitly with %concat.
|
|
|
 |
|
|