Closed twdkeule closed 1 year ago
This is not a real error in a sense that it doesn't affect gameplay, it's just a part of a hack used to check which arable resources are available in which states.
The script that leads to the error takes a state that doesn't have a certain building and tries to create it there, then it checks if the building was actually created and if it's possible to add more levels to it, manipulates some variables if yes, and then without any conditions and checks tries to remove this artificially created building from the state, as ensuring that we actually removed it and no changes to gameplay happened is more important than some errors in the log when we get a lot of them anyways.
Maybe I'm overly paranoid with Jomini at times, but it is what it is.
You can probably remove the error by replacing remove_building = $key$
with if = { limit = { any_scope_building = { is_building_type = $key$ } } remove_building = $key$ }
There is an error in the aroai_check_if_state_region_has_agriculture_resource function:
at
remove_building = $key$
.I suspet the first if is failing, but I dont know why. I am willing to fix this myself, but I have no idea how the if-limit check works. Can you point me in the right direction?