Hello--
This error means that your code includes a primitive that only turtles or links can use, in statements that are instead executed by the Observer.
Your code has several mistakes about whether the observer or turtles are doing something. In particular, it looks like the procedures "assign-age-cohort" and "assign-color" should be executed by each turtle (currently they are executed once by the Observer). To do that, the go procedure should say ask turtles [assign-age-cohort assign-color].
And: are you sure that age, age-num, and age-cohort should not be turtle variables instead of globals?
It will probably help you to re-read the User Manual's Programming Guide, especially the sections on Agents, Procedures, and Ask.