This code is in Javascript and it runs very well in ArcGIS Pro in ArcMap it doesn't run or work.
What could be the problem? I need help please.
function FindLabel ( [OffsetX], [OffsetY], [LabelLong], [Strength])
{
r = [OffsetY]
c = [OffsetX]
xshift = ""
yshift = ""
for (i = -5; i < c; i++) {
xshift += "<FNT name = 'ESRI Default Marker' size = '36'>" + "?" + "</FNT>"
}
for (i = 0; i < Math.abs(r); i++) {
yshift += "<FNT name = 'ESRI Default Marker' size = '36'>" + "?" + "</FNT>" + "\r"
}
label = xshift + [LabelLong]+' '+"["+[Strength]+"]"
if ( r > 0) { label += yshift }
else { label = yshift + label }
return label ;
}
Are you selecting the JScript parser when using ArcMap's labeling engine?