scratcher911 Posted August 31, 2012 Share Posted August 31, 2012 addEventHandler("onClientMarkerHit", jobMarker, function() local red, green, blue = getMarkerColor( source ) local name = getElementData(source, "JobName") local info = jobsInfo[getElementData(source, "JobName")][1] local skins = jobsInfo[getElementData(source, "JobName")][3] createJobWindow(name, info, RGBToHEX( red, green, blue ), skins) end function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end why it shows RGBToHEX a nil value ? Link to comment
arezu Posted September 1, 2012 Share Posted September 1, 2012 you are trying to call 'RGBToHEX' while the function is actually called 'RGBToHex'. Link to comment
scratcher911 Posted September 1, 2012 Author Share Posted September 1, 2012 oh. Thanks didn't notice that. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now