noxsicarius / Epoch-Admin-Tools

An admin menu for the AmrA2 DayZ mod. Lead Developer: NoxSicarius
GNU General Public License v3.0
30 stars 48 forks source link

Test Branch "Teleport to me" #292

Closed therealsputnik closed 8 years ago

therealsputnik commented 8 years ago

Hi, Using the "Teleport to Me" option does nothing. (Get the prompt to choose the username of the player to TP to me but when I select them, nothing happens at all.)

Teleport (myself) to location and Teleport (myself) to player works just fine.

Tried on freshly rebooted server without success. Same after relog.

therealsputnik commented 8 years ago

This might be useful:

Client RPT:

tempList = tempList + _x; EAT_PVEH_teleportFix = ["add",_UID> Error position: <+ _x; EAT_PVEH_teleportFix = ["add",_UID> Error +: Type Object, expected Number,Array,String File mpmissions__CUR_MP.Chernarus\admintools\tools\Teleport\TPtoME.sqf, line 26 String STR_EVAL_TYPENAN not found Error in expression <(getPlayerUID _x);

tempList = tempList + _x; EAT_PVEH_teleportFix = ["add",_UID> Error position: <+ _x; EAT_PVEH_teleportFix = ["add",_UID> Error +: Type Object, expected Number,Array,String File mpmissions__CUR_MP.Chernarus\admintools\tools\Teleport\TPtoME.sqf, line 26 String STR_EVAL_TYPENAN not found Error in expression <(getPlayerUID _x);

tempList = tempList + _x; EAT_PVEH_teleportFix = ["add",_UID> Error position: <+ _x; EAT_PVEH_teleportFix = ["add",_UID> Error +: Type Object, expected Number,Array,String File mpmissions__CUR_MP.Chernarus\admintools\tools\Teleport\TPtoME.sqf, line 26

Server .RPT: nothing

noxsicarius commented 8 years ago

I may have fixed the issue. I was adding an object to an array instead of the object ID. Just copy over the new TPtoME and variables.sqf. Tell me if it does not fix it. I cleaned up the variable handler to try because the old one took more server processing than necessary. I previously did this, but the TP wasn't working and it still isn't because I didn't notice that error you posted for me. I believe with this fix, the cleanup I wanted to do will work perfectly. If this NEW variable/TP file fix does not work, you can revert to the last variables.sqf and it should work without any issues. By this I mean use the NEW TP file, and the old variable file. This is so you won't have to wait for me to update the github. This is the varibles.sqf to use IF THE NEW ONE DOES NOT WORK.

therealsputnik commented 8 years ago

Nope, still nothing. Client RPT says:

tempList = tempList + _UID; EAT_PVEH_teleportFix = ["add",_U> Error position: <+ _UID; EAT_PVEH_teleportFix = ["add",_U> Error Generic error in expression File mpmissions__CUR_MP.Chernarus\admintools\tools\Teleport\TPtoME.sqf, line 26

noxsicarius commented 8 years ago

generic error. That's pretty helpful... There doesn't seem to be any reason for it so I will have to look some more.

therealsputnik commented 8 years ago

Thanks. Will be ready to test. ;)

noxsicarius commented 8 years ago

Try deleting line 43 and 26 for me. They don't serve much purpose for the one calling the function. It's mostly important for the one being teleported to have the templist setup to bypass the antihack for a few seconds. It seems to be the issue here and there isn't a reason it should be.

therealsputnik commented 8 years ago

Ok, I removed 43 and 26 and yes indeed it works now. However, it takes a few seconds to happen. I get the message "Teleporting USERNAME" on screen for about 3 seconds then the teleported user appears. Server and Client RPT don't seem to be complaining.

noxsicarius commented 8 years ago

So it is working fine now? There is a built in delay at the moment to rule out the possible issue of the client not getting the bypass variable before it is teleported resulting in an antihack issue.

noxsicarius commented 8 years ago

I also think I figured out why the generic error was occurring. This language doesn't have a proper push command so I have had to use the more crude way of appending array elements and I may have done the append incorrectly for this language. (It is hard to keep languages separate when you have worked with as many as I have)

therealsputnik commented 8 years ago

Well it working just fine now. Thanks for applying your skills to this matter. If you need anything else tested, feel free to ask.

noxsicarius commented 8 years ago

EDIT Nevermind. I do know the problem there. You should be good to go.

therealsputnik commented 8 years ago

OK, multiple teleport tests later, NO complaints in server or client RPT.

therealsputnik commented 8 years ago

This was strange: I teleported myself to a different location. Ran about 20m and teleported the user again. He was not teleported to me but to the location I teleported myself 20m away...

noxsicarius commented 8 years ago

Seems to me the game didn't quite update your position yet. (The game takes an update from your client every so often) This shouldn't be a common issue. I will look into it, but I need you to do one test. Give the guy a car, and try the teleport with him in it. I added a way to teleport players in vehicles recently, but I never had a chance to test it.

therealsputnik commented 8 years ago

OK, spawned a SUV, player got in, tried teleport him to me. No go. Tried another two times, nothing. He gets out the SUV and can teleport to me, no problem. Server RPT, nothing, client says:

WARNING: Function 'name' - 79e40080# 1058664: ghillie_top.p3d REMOTE has no unit

_agent moveTo _targetPos; _a> Error position: <_target;

_agent moveTo _targetPos; _a> Error Undefined variable in expression: _target WARNING: Function 'name' - 79e40080# 1058664: ghillie_top.p3d REMOTE has no unit

therealsputnik commented 8 years ago

If I get in the vehicle (alone) I can teleport myself and the vehicle, no issues. If the player gets in the vehicle with me I can STILL teleport the vehicle with the both of us in it, no issues.

noxsicarius commented 8 years ago

This will take more looking into. It's not necessary for the tools, but it is a requested function and I do see it's important uses. It seems there is some kind of issue with the game targeting the player skin rather than the player.

therealsputnik commented 8 years ago

Well I have a good setup for testing, so just shout if you need.

noxsicarius commented 8 years ago

It would be great if you could test the return teleport player option I just added. It can be tested one of two ways: from the player ticket menu or the teleport menu. The option title is: Return Player to Last Pos.

To test it: Replace all admintool files NOT INCLUDING the config.sqf (so you don't have to redo the options) Teleport a player to you, then use the return option. It should send the player back to their exact position when you moved them to you. Might be easiest to put them in a trader city and try to teleport them into a field then back. Easiest way to be sure it sent back to the right place.