function GetPosition ( player )
local x, y, z = getElementPosition( player )
outputChatBox("Your Position: "..x..", "..y..", "..z)
end
addCommandHandler ( "Postion", GetPosition )
You added an extra ". You should work in a text editor that supports syntax highlighting, which makes errors like this easier to spot.
Just in case anyone needs the opposite of this function:
function rgbToHex ( nR, nG, nB )
local sColor = "#"
nR = string.format ( "%X", nR )
sColor = sColor .. ( ( string.len ( nR ) == 1 ) and ( "0" .. nR ) or nR )
nG = string.format ( "%X", nG )
sColor = sColor .. ( ( string.len ( nG ) == 1 ) and ( "0" .. nG ) or nG )
nB = string.format ( "%X", nB )
sColor = sColor .. ( ( string.len ( nB ) == 1 ) and ( "0" .. nB ) or nB )
return sColor
end