Alishen Posted October 29, 2020 Share Posted October 29, 2020 (edited) So i know how to use list, this has always worked in the past for me. touch_start(integer total_number) { list stuff = llParseString2List((string)llGetObjectDesc(),[":"], []); who = llDetectedKey(0); vector pos = llDetectedTouchST(0); integer link = llDetectedLinkNumber(0); Pos = ((llFloor((pos.x*1)*x)/1)*(integer)y)+llCeil(pos.y*y); { if(link == 5){ if(~llListFindList(player, [who])) { // do somthing llSay(0,"do something"); }else{ llSay(0,"this is the list key residing in the player list - "+llDumpList2String(player,",")); llSay(0,"this is the the clickers key, we looking for - "+(string)who); } } } my uid key is added to the list after a payment, the list is player as you see in the llDumpList2String(player,",")); I should get llSay(0,"do something"), as my key is clearly in the list, also I tried it with if(llListFindList(player, [who]) == -1) { // key not in list llSay(0,"this is the list key residing in the player list - "+llDumpList2String(player,",")); llSay(0,"this is the the clickers key, we looking for - "+(string)who); also I make the key a string and trimmed it for white spaces before placing in the list feeling that might be it, but still no. }else{ //key in list // do somthing llSay(0,"do something"); } every time I run the function it can not find the key in the list, but as you see in my debug message my key is in the list and my key is the clicker.. [05:41] Alishen - Cho-han Game: this is the list key residing in the player list - 69282ae3-173d-414b-959a-8ca337a17d17 [05:41] Alishen - Cho-han Game: this is the the clickers key, we looking for - 69282ae3-173d-414b-959a-8ca337a17d17 Edited October 29, 2020 by Alishen Link to comment Share on other sites More sharing options...
Alishen Posted October 29, 2020 Author Share Posted October 29, 2020 (edited) nvm, i reset the region and it works. Edited October 29, 2020 by Alishen 1 Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted October 30, 2020 Share Posted October 30, 2020 15 hours ago, Alishen said: list stuff = llParseString2List((string)llGetObjectDesc(),[":"], []); who = llDetectedKey(0); ... if(~llListFindList(player, [who])) Your problem is a type mismatch. default { state_entry() { list stuff = ["779e1d56-5500-4e22-940a-cd7b5adddbe0"]; key who = "779e1d56-5500-4e22-940a-cd7b5adddbe0"; llOwnerSay( (string)llListFindList(stuff, [who]) ); } } This script will return -1 (not found). Why? Because the list contains a string, and who contains a key. They may look the same, but they aren't the same. Link to comment Share on other sites More sharing options...
Kyrah Abattoir Posted October 30, 2020 Share Posted October 30, 2020 Yeah if an LSL function takes a list as an argument make sure that each list entry has been cast to the expected type. 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