Jump to content

Distance Dependant Messaging Script


Juliena
 Share

You are about to reply to a thread that has been inactive for 2440 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 2440 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...