|
Talmark Novice
Joined: 22 Nov 2003 Posts: 34
|
Posted: Mon Oct 25, 2004 12:16 am
Trouble with %roomcontents |
I can't get contents added to a room in the mapper without manually clicking the Add Item to Room button in the database window--so I'm not able to use this function in any script.
I've tried to unlock the mapper with:
#EXE %maplocked(0)
And I've also tried to manually put the mapper into map mode before using the function:
#EXE %roomcontents(128he)
The help files says this will add record 128 from the Herbs database to the room current room. But nothing happens. Any suggestions? |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Oct 25, 2004 1:25 am |
Try (havn't tested this but the correct way to call a function is with #call)
#call %maplocked(0)
#call %roomcontents(128he) |
|
|
|
Talmark Novice
Joined: 22 Nov 2003 Posts: 34
|
Posted: Mon Oct 25, 2004 2:05 am |
Thanks. I got it to work with this:
#CALL %roomcontents(%roomnum,128he)
The help file for %roomcontents states that if vNum is omitted, 128he will be added to the current room. It doesn't appear to work like that, though. I had to use %roomnum to pull the current room number from the mapper. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Oct 25, 2004 2:19 am |
Ahhhhh I didn't bother reading the help if the first value is optional there still has to be a comma there :P
#CALL %roomcontents(,128he) |
|
|
|
Talmark Novice
Joined: 22 Nov 2003 Posts: 34
|
Posted: Mon Oct 25, 2004 2:28 am |
Yikes, forgot the comma! How many scripts have I pulled my hair out over because of a comma!
Now I just have to figure out how to get this to add items to the room contents without creating duplicates. |
|
|
|
|
|