Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need Help with my Hug script.

Lance Sismondi
Registered User
Join date: 28 Apr 2006
Posts: 21
05-11-2008 10:32
I am trying to get this script working and am getting an error "function call mismatch" on line 38 "llOwnerSay(0, "Av Found, " + llDetectedName(i));" . here is the code:

integer listen_num;
integer ch = 0;
string targ;
string objname;
default
{
state_entry()
{
llListenRemove(listen_num);
listen_num = llListen(ch, "", llGetOwner(), "";);
}

on_rez(integer param)
{
llResetScript();
}

listen(integer channel, string name, key id, string m)
{
list cmd = llParseString2List(m, [" "],[]);
targ = llList2String(cmd, 1);
targ = llDeleteSubString(targ,3,llStringLength(targ));
if(llList2String(cmd, 0) == "Hug";)
{
llSensor("","",AGENT, 100, PI);
}
}

sensor(integer num)
{
integer i;
for(i=0;i<num;i++)
{
string cutname = llDeleteSubString(llDetectedName(i), 3,llStringLength(llDetectedName(i)));
llSay(0, "cutname \n" + cutname);
if(llToLower(cutname) == llToLower(targ))
{

llOwnerSay(0, "Av Found, " + llDetectedName(i));
llMessageLinked(LINK_SET,0,llDetectedKey(i),NULL_KEY);
}
}
}
run_time_permissions(integer permissions)
{
if (llGetPermissions() & PERMISSION_TAKE_CONTROLS)
{
}
}
}

Could anyone point me in the right direction here? Thanks in advance!
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
05-11-2008 10:50
only thing i can think of would be add it as a (string) but it dosent seam to work there must be something wrong with the i part throwing it off try redoing it to use a 0? only thing i can think of
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
05-11-2008 11:25
llOwnerSay doesn't take a channel, so:

llOwnerSay("Av Found, " + llDetectedName(i));
_____________________
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
05-11-2008 13:02
lmao how i miss that xD