UbiquitousStudio Posted June 6, 2016 Share Posted June 6, 2016 Hello I am trying to grab a UUID, I made a text dialog and the person can input the uuid they want to assign. I am just trying to make sure it's a UUID, I just don't know the best way to go about it. Here is a bit of script default { state_entry() { integer channel = -13572468; gListener = llListen( channel, "", "", ""); llTextBox(ownerkey, "\nEnter the UUID of the avatar.", channel); } touch_start(integer total_number) { } listen(integer channel, string name, key id, string message) { // Want to check if message was uuid here. } }I could do llgetsubstring, and check if there is a - on the 9th letter, but I don't know if that's how all UUID's are or not. So I want to post here to be better safe then sorry.Thanks! Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 6, 2016 Share Posted June 6, 2016 Yes, the 9th character is always a "-". I think it is also always true that avatar UUIDs have a "4" as the 15th character. If that is true, and if only avatar UUIDs have a "4" in that position, you should be able to verify that a particular UUID belongs to an avatar. If you don't care whether it's an avatar's UUID but will just be satisfied that it's a valid UUID, you can always write message = (key)message;if (message){ //This is a valid UUID}else{ message = NULL_KEY;} Link to comment Share on other sites More sharing options...
wherorangi Posted June 6, 2016 Share Posted June 6, 2016 another way is to use: http://wiki.secondlife.com/wiki/LlRequestDisplayName it should return empty when is not a valid avatar key Link to comment Share on other sites More sharing options...
UbiquitousStudio Posted June 6, 2016 Author Share Posted June 6, 2016 Thank you! That was all that I needed and then some extra information along with it I never knew before. Fixed my issue, thanks very much for your time! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now