you forgot to close 'function' and add event, name function, and get resource
function mapStart (startedResource)
if getResourceInfo ( startedResource, "type" ) == "map" then
setSkyGradient(0,0,0,0,0,0)
end
end
addEventHandler("onResourceStart",getRootElement(),mapStart)