Ok, i've had a quick look at spawn_army for you... the syntax you worked out above is essentially correct -- the command expects a sequence of "unit" commands followed by unit id's as phrases ... the following should work:
spawn_army
faction romans_julii
character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, x 89, y 80
unit roman generals guard cavalry, soldiers 20 exp 9 armour 1 weapon_lvl 0
unit roman legionary first cohort ii, soldiers 40 exp 0 armour 0 weapon_lvl 0
unit roman legionary cohort ii, soldiers 60 exp 0 armour 0 weapon_lvl 0
unit roman praetorian cohort i, soldiers 60 exp 0 armour 0 weapon_lvl 0
end
The reason why unit and end appeared not to be recognised was because the data after and before (respectively) were incomplete.
This error is typical; understanding the Rome descr parser could have helped some. Essentially it works by parsing Words, which are letter sequences ended by whitespace, Phrases, which are word sequences ended by comma's, and Lines, which are word and phrase sequences ended by newline characters. In this case, there had to be a phrase terminator (comma) after the unit id, because otherwise the parser couldn't know where the unit id ends as a unit id is a phrase - a sequence of arbitrary words.
This is why some identifiers in the game use underscores and others not - internally some things are typed as Words and others as Phrases. If you look out for this kind of pattern it may help you spot wrongly-formed scripts... I'll see about getting you guys some docudemon files up-to-date for Barbarian Invasion.
Bookmarks