vector openpos;//XYZ coordinates of the door when closed
vector closedpos ;//XYZ coordinates of the door when closed
float offset;
integer channel;
key Offsetkey;
key Channelkey;
string gName = "Configuration";
float time = 5.0;//time before the door close itself
default
{
state_entry()
{
Offsetkey = llGetNotecardLine(gName, 0);
Channelkey = llGetNotecardLine(gName, 1);
}
dataserver(key query_id, string data)
{
if(query_id == Offsetkey)//Filtering the call
{
if (data != EOF) // not at the end of the notecard
{
offset = (float)data;
}
}
if(query_id == Channelkey)//Filtering the call
{
if (data != EOF) // not at the end of the notecard
{
channel = (integer)data;
}
}
state closed;
}
}
state closed
{
state_entry()
{
llListen(channel, "", "", ""
; llOwnerSay("Offset is " + (string)offset + " channel is " + (string)channel);
}
listen( integer channel, string name, key id, string message )
{
if (message == "Slide"

{
closedpos = llGetPos();
openpos = closedpos + <offset, 0.0, 0.0>;
llSay(0, (string)closedpos);
llSay(0, (string)openpos);
llSetPos(openpos);
llSleep(time);
llSetPos(closedpos);
}
}
}
I'm having a problem with the notecard reading. It's getting the keys for both lines of the notecard. But it doesn't seem to be processing the second key. It sets offset just fine but doesn't set channel. I've used multiple llOwnerSay functions and the script doesn't seem to be entering the second if(query_id == Channelkey).
The goofy thing is, this notecard reading stuff comes from a script that is working fine.
All and any comments greatly appreciated.
Someday I'll be good enough to give back to the forums.
RT