What's wrong with getting the UUID in this function?
#7
I see, thanks for explaining.

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.
Reply
Thanks given by:


Messages In This Thread
RE: What's wrong with getting the UUID in this function? - by Gamerboy59 - 11-19-2015, 06:23 AM



Users browsing this thread: 2 Guest(s)