RandomTP - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: RandomTP (/thread-2093.html) Pages:
1
2
|
RE: RandomTP - Keith - 08-30-2015 PHP Code: function Initialize(Plugin) RE: RandomTP - NiLSPACE - 08-30-2015 That's really weird. Could you add a "print(X, Height, Z)" before the TeleportToCoords line? And perhaps add "print(Height)" after the TryGetHeight function. RE: RandomTP - Keith - 08-30-2015 before error is -1227 nil 1235 PHP Code: function Initialize(Plugin) Its a madness. Values are great, teleportation should work :/ RE: RandomTP - NiLSPACE - 08-30-2015 Yeah, really strange indeed. I'll try to reproduce the issue. RE: RandomTP - NiLSPACE - 08-30-2015 Oh, I believe ChunkStay is async. Because of that the Height variable isn't filled when trying to teleport the player. If you move the teleport/sendmessage code in the function where you get the height it should work properly. RE: RandomTP - tigerw - 08-30-2015 And don't forget to use Code: Player:SendMessageSuccess("Teleported to coordinates: " .. X .. etc.); :) RE: RandomTP - NiLSPACE - 08-30-2015 That's a matter of preference. I personally think they look awful, and I will never use them. RE: RandomTP - NiLSPACE - 08-31-2015 @DiamondToaster What I suggested should already work. ChunkStay ensures that the chunk is loaded. RE: RandomTP - xoft - 08-31-2015 @DiamondToaster: Your code is wrong, you're using function DoCheck() before you define it. Also, ChunkStay ensures that the chunk is loaded so checking is not needed anymore, just teleport. |