.URD in locl feature returns error

Glyphs Version 2.6.4 (1286)

When I add the language tag to my locl feature I get the following error:
MakeOTF erro
[internal] label not found

lookup locl_URD {
script arab;
language URD;
sub arFourFarsi by arFourFarsi.URD ;
sub arSevenFarsi by arSevenFarsi.URD ;
} locl_URD ;

When I comment-out the language tag it compiles correctly, but obviously the desired behaviour does not work in the font. Conversely, the languagesystem is recognized: languagesystem arab URD;

That depends on what comes before (and after) in the feature code. Unfortunately the makeotf error messages are pretty cryptic. What happens if you move the script and language declarations into the line before the lookup definition?

Funny, that’s what I usually do but here I copied what Glyphs builds automatically, thus script and language statement inside the lookup, rather than the other way around.

Moving it out as you suggested solved the problem, curious. Thanks!

I would need to see the whole feature for context. The order of script and language declarations matters.

this is what I had before:

lookup locl_arab_0 {
script arab;
	sub colon by colon.arab;
	sub exclam by exclam.arab;
	sub ellipsis by ellipsis.arab;
} locl_arab_0 ;

lookup locl_URD {
script arab;
language URD;
	sub arFourFarsi by arFourFarsi.URD ;
	sub arSixFarsi by arSixFarsi.URD ;
	sub arSevenFarsi by arSevenFarsi.URD ;
} locl_URD ;

Is URD the only language specified in languagesystems? Then the the 2nd lookup declaration may not be valid because it occurs between script and language declarations:

Rules specified between the occurrence of the script statement and the first language statement other than dflt are added to explicitly specified languages for the current script, but not to other scripts, nor to other languages of the same script that are not named in the feature. If your font has several languages for a given script, and you need language specific rules for only some of the languages, you should still explicitly name all of the languages so that they will inherit the script-level default rules.

(AFDKO Spec)

The area between a script declaration and a language declaration is shaky ground. See also: