Jump to content

Distance Dependant Messaging Script


Juliena
 Share

You are about to reply to a thread that has been inactive for 3015 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So I'm making a script that when you click it, if you're not close enough you get one answer but if you're within 10m, you get another. My issues is that I'm getting an Error: Type Mismatch within the script and I'm not sure why, as all floats/vectors/strings/integers are in their correct places. (It's not a complicated script!)

Here's a copy of the script below.

default
   {

      touch_start(integer total_number)
         {
             vector Pos = llGetObjectDetails(llDetectedKey(0),[OBJECT_POS]);
             if (llVecDist(Pos,llGetPos()) < 10.0)
                 {
                       llInstantMessage(llDetectedKey(0), "");
                 }

            else
                 {
                      llInstantMessage(llDetectedKey(0), "You're too far away to see anything of interest right now.");
                 }
        }
}

 

If you have any idea why this script isn't working, I'd appreciate a fix and an explanation, thanks.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3015 days.

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
 Share

×
×
  • Create New...