11-19-2015, 06:23 AM
(This post was last modified: 11-19-2015, 06:25 AM by Gamerboy59.)
I see, thanks for explaining.
I've got now the following code:
Still invalid playername. Is the MojangAPI broken?
I tried another function (/useruid <friendusername>):
I've got now the following code:
local friendusername = cMojangAPI:GetUUIDFromPlayerName(Split[3], true)
if (friendusername == "" or friendusername == nil) then
Player:SendMessageFailure("Invalid Playername")
return true
end
local file = io.open(friendDir.."\\friends.txt", "a")
file:write(friendusername.."\n")
file:close()
Player:SendMessageSuccess("Friend added. You can check with /friend [playername]")
Still invalid playername. Is the MojangAPI broken?
I tried another function (/useruid <friendusername>):
local friendusername = cMojangAPI:GetUUIDFromPlayerName(Split[2], true)
Player:SendMessageInfo("Found player:"..friendusername)
Returns nil while the player definitely exists.

