"Teleport failed." message FIXED

Creating scripts
Post Reply
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

"Teleport failed." message FIXED

Post by Kayaker Magic »

I have a teleport system on Panthalassa that uses osTeleportAgent to move people around. It used to work fine, but lately it has been giving me an error message every time I teleport:

Teleport failed.
Prevous teleport process incomplete. Please retry shortly.

The dumb thing is, the teleport always works! Then it gives me this message as if it didn't work. Re-logging does not solve the problem and neither does waiting for the region to restart. Is anyone else having problems with osTeleportAgent?

Here is the one line where I call the function:

Code: Select all

            osTeleportAgent(avatar, tpos, <1,0,0>*trot);
Last edited by Kayaker Magic on Sun Mar 01, 2015 11:13 pm, edited 2 times in total.
These users thanked the author Kayaker Magic for the post:
Selby Evans
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Re: "Teleport failed." message

Post by Kayaker Magic »

I am still getting this error message every time I use my in-world teleporter.
And it is getting stranger.
I checked with my Alt to see if it gave the same error message to all users, it does not, just me, the landowner.
I checked to see if I was calling osTeleportAgent twice for each teleport and I am not.
Then I discovered that if I was in-world at the same time as my alt, that one call to osTeleportAgent teleported BOTH of us to the destination.
I checked to see what UUID I was using for that call, and it was my alts UUID, not mine. But I got teleported at the same time.

Here is a little more detail about how I call osTeleportAgent:
The transmitting teleporter sends a message and the receiving station sends a reply with the location.
The UUID of the avatar that touches the teleporter is recorded in a global variable named avatar
So the teleport actually happens in the listen event, here is the whole event:

Code: Select all

    listen( integer channel, string lname, key id, string message )
    {
        list parse=llParseString2List(message,["|"],[]);
        string cmd=llList2String(parse,0);
        string receiver=llList2String(parse,1);
        if (cmd=="loc" && receiver==name && avatar!=NULL_KEY)
        {
            llPlaySound("transporter",1);
            llSetTimerEvent(0);         //turn off the watchdog timer
            vector tpos=(vector)llList2String(parse,2);
            rotation trot=(rotation)llList2String(parse,3);
            osTeleportAgent(avatar, tpos, <1,0,0>*trot);
        }
    } //listen
User avatar
Ilan Tochner
Posts: 6527
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4992 times
Been thanked: 4473 times
Contact:

Re: "Teleport failed." message

Post by Ilan Tochner »

We'll look into it Kayaker.
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Re: "Teleport failed." message FIXED

Post by Kayaker Magic »

This is embarassing, but it was all my fault.
When I upgraded to using osTeleportAgent, I clobbered a line that was clearing the last avatar that requested a TP.
It seemed to work for a while.
But after my UUID got stored in that global variable in several teleporters, they responded when someone else TP'd to the same location.
If it was me TPing to the same location, multiple copies would try to TP me at once, giving the error dialog.
If it was someone else TPing to a location I had been to recently, the other teleporters would grab me and send me there also.

So I put back in the line to clear the UUID of the last successfully teleported avatar, and everything works.

osTeleportAgent works just fine.
User avatar
Ilan Tochner
Posts: 6527
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4992 times
Been thanked: 4473 times
Contact:

Re: "Teleport failed." message FIXED

Post by Ilan Tochner »

Thank you for the update Kayaker.
Post Reply