Noob needs to learn how to code contextual alternatives

There is also a step-by-step tutorial available:
http://www.glyphsapp.com/tutorials/features-part-4-positional-alternates

Hello.
I did everything as Dan_Apparatus
I had an error (see photo)!
How can i change it
My code is correct?

Read the error message. You target class @terminal does not have the same number of glyphs as the replacement class @medial. If you replace one class by another, both need to have the same number and order of glyphs.

1 Like

Thanks for the answer!

I read this topic:
https://glyphsapp.com/tutorials/features-part-4-positional-alternates
Everything works! All is well!

But the question remains:
Do I have a condition that all glyphs have the same amount of classes?

What should I do if I have a total of 3 terminal forms and 4 initial forms?
For example:
b.fina
d.fina
h.fina
and
c.init
k.init
j.init

I want to automatically work once these letters.
You can configure the code so that only worked these letters at the beginning and the end?

P.S. Forgive me for bad English

If you want to substitute one class by another, they have to have the same amount of glyphs. Makes sense, I think. If you have a different amount of initial, medial and final glyphs, you will have to find a different class setup. Try the script that is mentioned at the end of the tutorial, it does exactly that.