What is the error message, and on what line of the code snippet?
Line 7: Don't compare boolean values, use them directly:
Line 15: The message seems badly escaped at the HTML quotes:
On a side note, it seems that the cPlayer::MoveToWorld() function could benefit from additional parameters:
Player:MoveToWorld(WorldName, PosX, PosY, PosZ);
Oh, it seems the forum's Lua syntax highlighter does some escaping on its own. Anyway, get the Decoda Lua IDE and edit the Lua files in it, it will help you by syntax-highlighting and you can even debug the code there. Here's a guide:
https://forum.cuberite.org/showthread.php?tid=1141
Line 7: Don't compare boolean values, use them directly:
if (not(Player:MoveToWorld(Split[2]))) then
Line 15: The message seems badly escaped at the HTML quotes:
Player:SendMessage( cChatColor.Green .. "Moved successfully to '" .. Split[2] .. "'! <img src=\"images/smilies/biggrin.gif\" style=\"vertical-align: middle;\" border=\"0\" alt=\"Big Grin\" title=\"Big Grin\">" )
On a side note, it seems that the cPlayer::MoveToWorld() function could benefit from additional parameters:
Player:MoveToWorld(WorldName, PosX, PosY, PosZ);
Oh, it seems the forum's Lua syntax highlighter does some escaping on its own. Anyway, get the Decoda Lua IDE and edit the Lua files in it, it will help you by syntax-highlighting and you can even debug the code there. Here's a guide:
https://forum.cuberite.org/showthread.php?tid=1141