Okay, it's still not working for some reason prompt "Remove" is the only msg that get added to access list.
//GLOBALS//----------//INTEGERS//----------integer freq = 1;integer scriptc = 283638;//LIST//---------list sensl; //sensor listlist accessl; //access list//FUNCTION//-----------integer IsInList(list data, string msg){ integer i; for(i=0; i<llGetListLength(data);i++) { if(llList2String(data,i) == msg) { return TRUE; } } return FALSE;}default{ state_entry() { llSensorRepeat("","",AGENT,20,PI,freq); llListen(scriptc,"","",""); } touch_start(integer x) { llDialog(llDetectedKey(0),"Sensor To Dialog Access and Removal Script",["Add","Remove"],scriptc); } sensor(integer num_detected) { integer i; string name; for(i=0;i<num_detected;i++) if(IsInList(sensl,llKey2Name(llDetectedKey(i)))) { //DO NOT ADD THE SAME AV"S NAME } else { if(llStringLength(name) >24)//if name characters are greater that 24 { name = llGetSubString(name,0,23); } name = llKey2Name(llDetectedKey(i)); sensl += name; } } listen(integer channel, string name, key id, string msg) { if(msg == "Add") { llDialog( id, " \n Detected avatars ...", sensl, scriptc); } else if (!~llListFindList(sensl,[msg]) ) { accessl += [msg]; llOwnerSay( msg + " was added to the access list."); } }}