Author Topic: room SetItems() oddity  (Read 1237 times)

Offline z993126

  • BFF
  • ***
  • Posts: 128
    • View Profile
room SetItems() oddity
« on: January 30, 2012, 10:24:50 PM »
In this room
Code: [Select]
#include <lib.h>
#include ROOMS_H

inherit LIB_ROOM;

static void create(){
room::create();
SetClimate( "indoors" );
SetAmbientLight( 30 );
SetShort( "Interdimensional library" );
SetLong(
"An unbroken sea of leatherbound tomes fills the tiers of "
"basalt shelves which wrap around this cavernous rotunda.  "
"The pearlescent white of the crystal dome and softer, "
"subtler glow of the floor's smooth, unworked sunstone "
"provide enough light to navigate the volumes."
);
SetItems( ([
({ "sea", "tomes", "books", "volumes" }) :
"There are a large number of leatherbound tomes here."
]) );
}

void init(){
::init();
}
a command that uses a number (for instance, 'set watch to 12:34') returns "There is no 12th to:34 here." (the error generated when the fighter NPC had "" in its list of SetId()s).

When the code is changed to
Code: [Select]
#include <lib.h>
#include ROOMS_H

inherit LIB_ROOM;

static void create(){
room::create();
SetClimate( "indoors" );
SetAmbientLight( 30 );
SetShort( "Interdimensional library" );
SetLong(
"An unbroken sea of leatherbound tomes fills the tiers of "
"basalt shelves which wrap around this cavernous rotunda.  "
"The pearlescent white of the crystal dome and softer, "
"subtler glow of the floor's smooth, unworked sunstone "
"provide enough light to navigate the volumes."
);
SetItems( ([
({ "tomes", "books", "sea", "volumes" }) :
"There are a large number of leatherbound tomes here."
]) );
}

void init(){
::init();
}
the command works properly without error.

That's pretty weird.