Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Doesn't want to give me asset id for item

Nickolus Lufbery
Registered User
Join date: 14 Oct 2006
Posts: 25
10-12-2008 06:58
Tried using the linden example script

default
{
state_entry()
{
llOwnerSay(llGetKey());
llOwnerSay(llGetLinkKey(llGetLinkNumber()));
}
}

Saves correctly but doesn't message me anything, also tried putting it in onrez but still no results, anyone?
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
10-12-2008 07:31
Hmm. Really, only strings are supposed to be used in ll*Say functions, but keys are a special almost-string type that should work there (and your sample does work for me).

Some ways I can think of, that would let you compile that script without errors and still have it print nothing:

1. The area where you are trying this experiment doesn't allow scripts, check your group tag if it's a place where you should have permission.

2. You've compiled the script in your own inventory and not yet dragged it into a prim.

3. You've dragged the script into a prim you don't own (that is, someone else's prim where you have edit permissions). In this case the script would be running, but sending the llOwnerSay messages to the prim's owner if nearby instead of you.

eta: also check that running checkbox in the editor window, sometimes it gets turned off on earlier errors, and it won't turn itself back on after a recompile that does work.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
10-12-2008 08:40
it usually shouldn't be needed for keys said in a string, but you may try writing (string) in the script IE:

llOwnerSay((string)llGetKey());
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
nods
10-12-2008 14:18
I'm finding that I have to use (string) in my llOwnerSay commands for keys in the last few weeks my self.
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
10-12-2008 14:44
I don't think it's a string cast problem. If it was, the OP would get a syntax (or something) error when he tried compiling.

Nickolus, this is a script you put in an object, right? That is, you're not editing the script in your inventory, are you?

Also, make sure the Running checkbox at the bottom of the script editor window is checked..
Nickolus Lufbery
Registered User
Join date: 14 Oct 2006
Posts: 25
10-12-2008 16:36
thanks it works making it a string now. Sure would be nice if lindens made their own code work with their own game