Just testing in a new environment Pro 3.0 and noticed when applying an attribute rule to a field it there is a validation error ' Unexpected Error. Error on line 18. Unexpected null'. Code below. This rule validates in 2.9 (Image below).
This rule simply updates a field used to rotate cartography points based on the lines direction.
var easementLines = Intersects(FeatureSetByName($datastore, "Easements_Lines", ['objectid'], false), $feature)
var parcelLines = Intersects(FeatureSetByName($datastore, "Parcels_Lines", ['objectid'], false), $feature)
var lotLines = Intersects(FeatureSetByName($datastore, "Lots_Lines", ['objectid'], false), $feature)
var x = null
if (Count(easementLines) > 0){
var x = easementLines
}
else if (Count(parcelLines) > 0){
var x = parcelLines
}
else if (Count(lotLines) > 0){
var x = lotLines
}
if (!(x == null)){
var line = first(x)
var geom = Geometry(line)
var pt0 = geom.paths[0][0]
var brg = Bearing(pt0, Geometry($feature))
if (brg > 90 && brg <= 360) {
return (450 - brg)
}
if (brg >= 0 && brg <= 90) {
return (90 - brg)
}
return null
}


Any thoughts would be great.