What's wrong with getting the UUID in this function?
#2
Try this instead:
local UUID = cMojangAPI:GetUUIDFromPlayerName(Split[3], true)
if (UUID == "") then
   Player:SendMessageFailure("Invalid Playername")
   return true
end

local file = io.open(friendDir .. "/friends.txt", "a")
file:write(UUID, "\n")
file:close()
Player:SendMessageSuccess("Friend added. You can check with /friend [playername]")

You're using FindAndDoWithPlayer, but that means he already came online at least once. This means his UUID is already known in the database.
Reply
Thanks given by:


Messages In This Thread
RE: What's wrong with getting the UUID in this function? - by NiLSPACE - 11-18-2015, 10:17 PM



Users browsing this thread: 2 Guest(s)