This error message:
NullPointerException
at processing.Script.namesAndLabels(Script.kt:209)
at processing.Script.checkAll(Script.kt:22)
(...)
Pertains to these lines in the code, specifically the first one of the two:
I have two guesses at what's wrong, where I think the second one is more probable as it only requires a typo rather than a failure that should have caused all manner of problems for your mod.Code:if(nameTokens.size > 1 && !main.data.strat.names[faction]!!.characterSurnames.contains(nameTokens[1])) main.writeScriptLog("${character.filename} ${character.lineNumber}: Surname ${nameTokens[1]} is not defined in surnames for its faction $faction.")
1. You have no names defined for one of your factions - causing the storage of that faction's names to be blank. The code assumes there are names for ALL defined factions, and I find it likely that you do have that.
2. The faction variable it's using to access the storage of names is taken from the owner of a character in the script. Possibly you have got a character with a typo in his/her owner faction? As an example of a character definition, here is a spawned character in EB2.
Edit: I have now made a change that should allow it to survive a typo in the faction. It should then result in output somewhat like this:Code:spawn_army faction f_seleukid character Polyxenidos Baktrianos, named character, age 37, x 409, y 197, label sel_exped1, direction NE traits CommandExperience 3 , GoodAttacker 1, LoyaltyLevel 5, SeleukidHeterogenes 1, HaleAndHearty 2 unit hellenistic cavalry general bodyguard exp 4 armour 0 weapon_lvl 0 unit eastern cavalry mada asabara exp 1 armour 0 weapon_lvl 0 unit eastern cavalry mada asabara exp 0 armour 0 weapon_lvl 0 unit eastern cavalry harauvatish asabara exp 1 armour 0 weapon_lvl 0 unit eastern cavalry harauvatish asabara exp 0 armour 0 weapon_lvl 0 unit hellenistic infantry phalangitai exp 1 armour 0 weapon_lvl 0 unit hellenistic infantry phalangitai mercenary exp 1 armour 0 weapon_lvl 0 unit hellenistic infantry pantodapoi phalangitai exp 0 armour 0 weapon_lvl 0 unit hellenistic infantry pantodapoi phalangitai exp 0 armour 0 weapon_lvl 0 unit eastern infantry babylonian exp 1 armour 0 weapon_lvl 0 unit eastern infantry babylonian exp 0 armour 0 weapon_lvl 0 unit eastern infantry kavakaza kofyaren exp 1 armour 0 weapon_lvl 0 unit eastern infantry kavakaza kofyaren exp 0 armour 0 weapon_lvl 0 unit eastern infantry nizagan eranshahr exp 1 armour 0 weapon_lvl 0 unit eastern infantry nizagan eranshahr exp 1 armour 0 weapon_lvl 0 unit eastern infantry slinger exp 0 armour 0 weapon_lvl 0 end
campaign_script.txt 899: Character of faction factionWithTypo cannot have name checked, cannot find any names defined for that faction! Wrong faction?