Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

casting a string to a key

Sator Canetti
Frustrated Catgirl
Join date: 20 Sep 2005
Posts: 130
03-17-2006 08:14
I've been trying to cast a string to a key, so I can operate key operations on a key given in chat, but I can't seem to get it to work.

Do strings not typecast to keys, or is there some special way besides (key) somestring [which doesn't seem to work]
_____________________
"Have gone to commit suicide. Intend to return from grave Friday. Feed cat." -- A memo by Spider Jerusalem in Transmetropolitan

"Some people are like Slinkies; not really good for anything, but they still bring a smile to your face when you push them down a flight of stairs."

If you're reading this signature, I've probably just disagreed with you. Welcome to the club :D
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
03-17-2006 08:32
If the string you've got is valid as a key (right length, positioning of dashes etc.) it should typecast to a key as (key)myString.

I've never tried it to be honest - usually I'm going the other way - but I'd guess if you did it with an invalid key you'd generate a null_key response.
Sator Canetti
Frustrated Catgirl
Join date: 20 Sep 2005
Posts: 130
03-17-2006 08:48
Well, this is one of those fun LSL things, I guess, code was returning null last night, I took it into inventory, pull it out this morning and tada, it works fine O_o

Thank you much for your help :)
_____________________
"Have gone to commit suicide. Intend to return from grave Friday. Feed cat." -- A memo by Spider Jerusalem in Transmetropolitan

"Some people are like Slinkies; not really good for anything, but they still bring a smile to your face when you push them down a flight of stairs."

If you're reading this signature, I've probably just disagreed with you. Welcome to the club :D