05-19-2015, 02:50 AM
Hey,
Im a noob in Lua so I need your help.
I try to learn lua with MC-Server.
I want to access the global "cMojang" variable in my command.
So I created a function namend uuid_Handler (just a test) where I send a message:
The whole file is in the attachments.
The plugin is loading without errors, but when I run the command "/uuid" I get the following error:
I get the same error ("attempt to index global 'GetTranslation' (a nil value)") when I want to use the GetTranslation variable from TransAPI. TransAPI is loaded and the clientfile downloaded from github is in my "Plugins" folder. But when I access the function GetTranslation it gives me the same error.
What am I doing wrong?
Greetings from Germany,
Sidcode
Im a noob in Lua so I need your help.
I try to learn lua with MC-Server.
I want to access the global "cMojang" variable in my command.
So I created a function namend uuid_Handler (just a test) where I send a message:
Code:
function uuid_Handle(Args, Player)
Player:SendMessage("Deine UUID lautet:\n"..cMojang:GetUUIDFromPlayerName(Player:GetName(), true))
return true;
end
The plugin is loading without errors, but when I run the command "/uuid" I get the following error:
Code:
[18:36:12] LUA: Plugins/uuidTool/main.lua:36: attempt to index global 'cMojang' (a nil value)
[18:36:12] Stack trace:
[18:36:12] Plugins/uuidTool/main.lua(36): (no name)
[18:36:12] Stack trace end
[18:36:12] Error in plugin uuidTool calling function <callback>()
I get the same error ("attempt to index global 'GetTranslation' (a nil value)") when I want to use the GetTranslation variable from TransAPI. TransAPI is loaded and the clientfile downloaded from github is in my "Plugins" folder. But when I access the function GetTranslation it gives me the same error.
What am I doing wrong?
Greetings from Germany,
Sidcode