Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llRezObject and 'Couldn't find object' Error

ShaliaNahe Wise
Lost!
Join date: 7 Mar 2007
Posts: 6
03-08-2007 09:19
I am trying to write a script that will rez the gate to my doom when I rez my dome, after the Doom is placed on the ground, both objects are in there own folder 'Dome' in the 'objects' folder of the inventory.

So far the Doom will rez at ground level but no gate, only a script error 'Dome with locking door: couldn't find gatetodome'

I am new to this lsl so i probably made a silly mistake but just cant see it. any help will be grateful.

CODE
 
default
{
state_entry()
{
}

on_rez(integer startup)
{
vector pos = llGetPos();
rotation rot = llGetRot();
float GroundHeight = llGround(<0, 0, 0>);
pos.z = GroundHeight + 0.1;
llSetPos(pos);
llRezObject("gatetodome",pos,ZERO_VECTOR,rot,0);
}
}
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
03-08-2007 09:35
Check that the names are exact
ShaliaNahe Wise
Lost!
Join date: 7 Mar 2007
Posts: 6
03-08-2007 09:58
yes names are exact.

both objects are in inventory. in Object/Dome folder


Could it be the integer param set as 0 at the end of the line

llRezObject("gatetodome",pos,ZERO_VECTOR,rot,0); ?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
03-09-2007 01:41
From: ShaliaNahe Wise
yes names are exact.

both objects are in inventory. in Object/Dome folder


Could it be the integer param set as 0 at the end of the line

llRezObject("gatetodome",pos,ZERO_VECTOR,rot,0); ?


No, the zero is just an integer passed to the rezzed object at start up.
It can be used to initialise the object in some way (depending on how the script in it is written).

Which object is rezzing the door? If rezzing the dome works then the same line should also work for rezzing the door (with the name chanegd of course) ?
ShaliaNahe Wise
Lost!
Join date: 7 Mar 2007
Posts: 6
03-09-2007 02:41
The dome is rezzed manually from my inventory, The Scrip above is in the Dome Object and when Rezzed will set its hight to just above ground level and then it is supposed to rez the Door at the entrance.

By Renaming do you mean that I should call both objects the same?
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
03-09-2007 02:44
Names are case sensitive as far as I remember.

Also, did you make sure that the object that is to be rezzed is in the inventory of the object that contains the script that rezzes the desired object?

If the object-to-rez is in *your* personal inventory it won't work.
ShaliaNahe Wise
Lost!
Join date: 7 Mar 2007
Posts: 6
03-09-2007 02:55
From: Squirrel Wood
Names are case sensitive as far as I remember.

Yes names are exact

From: Squirrel Wood
Also, did you make sure that the object that is to be rezzed is in the inventory of the object that contains the script that rezzes the desired object?

yes they are all in the Object/Dome folder.

From: Squirrel Wood
If the object-to-rez is in *your* personal inventory it won't work.

Ok, now you lost me, if its not going to work from my personal inventory where do I put it?
_____________________
Looking lost in the Big Wide World of my 1st life.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
03-09-2007 04:45
If the script that is rezzing the door is in the dome object then the dome door also needs to be in the dome.
ShaliaNahe Wise
Lost!
Join date: 7 Mar 2007
Posts: 6
03-09-2007 15:02
ok this is confusing. by ' in the dome' do you mean they have to be one item in my inventory?

and if so how do I go about this.

Sorry iam new to this
_____________________
Looking lost in the Big Wide World of my 1st life.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
03-09-2007 15:25
From: ShaliaNahe Wise
ok this is confusing. by ' in the dome' do you mean they have to be one item in my inventory?

and if so how do I go about this.

Sorry iam new to this


OK. Lets just recap what is or isnt happening.
You have an object called dome which you are rezzing by dragging it to ground.
You have placed a script in this object which you want to use to rez a prim door for the dome. This is failing because the door prim is not in the inventory of the doem object containing the script.

llRezObject will rez a named object from the prim's inventory, NOT YOUR inventory.

To correct the problem drag the door prim into the contents of the dome object and then take it back into inventory and try rerezzing it.
ShaliaNahe Wise
Lost!
Join date: 7 Mar 2007
Posts: 6
03-09-2007 18:02
Thank you. I see how it works now. Now on to bigger things
_____________________
Looking lost in the Big Wide World of my 1st life.