Teleport to Spawn if lastBed doesnt exist
#2
The error message basically says it all. You're calling TeleportToCoords with wrong arguments, it expects a cEntity as its first parameter, but you're giving it a string.
Note that in Lua, there are two "calling conventions":
obj.fn("a") -- calls obj.fn with param "a"
obj:fn("a") -- calls obj.fn with params obj, "a"
The second is what Cuberite is using everywhere and is expecting from the plugins.

The SpawnX/Y/Z need to be read with a GetValueI() function, so that they are numbers, not strings.
Reply
Thanks given by:


Messages In This Thread
RE: Teleport to Spawn if lastBed doesnt exist - by xoft - 05-14-2017, 03:52 AM



Users browsing this thread: 2 Guest(s)