Ohh i've deleted in the meantime but maybe i have it on my other computer in the office. I'll check tomorrow or after tomorrow, depending on when i'll be in office. Thanks!
No worries, I inserted the attribute myself. I'm not getting the error. I've let the game run hands-off, historical until 1941. Or does it happen later?
In terms of code there are not many things that could make
set_army_template_command invalid:
- the division to be upgraded does not exist
- it is an expeditionary division
- the template to change to does not exist
- if the division is from an exiled government, it is of the wrong origin
The first three conditions should all work fine as the AI checks for those before issuing the command. I don't have MtG, so I'm not sure what exactly the rules of upgrading exiled divisions are supposed to be. The AI code certainly does not take this into account at all. Maybe you could check whether you get the errors without MtG as well (or somehow prevent governments in exile)?
If this is the culprit, it should also mean that light tank divisions getting exiled would throw this error in the unmodified game under the right circumstances.