The last 2 errors are the result of another error. If the error before those is resolved, then they will vanish. It would help to know the entire current log of errors, or at least the starting ones as those tend to be more important.
Viewing post in Aric's Expansion Rebred
Except that those are the only two errors showing up
Edit: nevermind, the last one is the same, but there’s a different one here
Edit 2:it appears, that in the save, the variable "Restrained" is False for some slaves, and "none" for others, I think the error is due to false being a boolean, and the code is looking for a string
From what I've heard, "Restrained" was a boolean in earlier versions, but it changed to a String. Replacing those False values with "none" should bring the save file up to date.
Otherwise you could add these lines above 1640 in expansion.gd(1 tab, and 2 tabs):
if typeof(person.restrained) == TYPE_BOOL:
person.restrained = "none"
now that that is done, after i fixed that, im getting these: this is from going to the next day twice, the first time was with the cattle being locked in, the next they weren't, a few of the errors is because there isn't a restraintype or stress_mod in the save file (i think), but the Invalid operands errors are not
The stress_mod issue likely means an error created while editing save files, as I am not aware of any changes in the mod and the error points to vanilla content. Hopefully you can undo, or have a backup of that save file. Though it's not hard to add it back to the stats dictionary with default value of 1, but if they are still present then the issue is a typo somewhere else.
restraintype should be apart of the expandedfarm dictionary inside the state dictionary. These are the default values, adding any missing should bring save file up to date.
var expandedfarm = {restraincattle = false, restraintype = "none", bottlesprice = 10, bottlesowned = 0, storingpiss = false}
String + Nil for Mansion.gd:690 is a derived error.
The following line appears to be wrong(Edit: expansion.gd:2208): if farmmanager.jobskills.farmmanager == null:
It should be: if farmmanager.jobskills.has("farmmanager") == false:
Nil > int for Mansion.gd:1238 is also derived.
Ah right, with the earlier changes your line numbers don't match my line numbers.
That picture is horrendous, better than no picture but still would prefer a proper screenshot. If you are on a windows system with a keyboard, then the PrtSc key will save the entire current screen to the clipboard and can be pasted into any picture editor(I use Paint to crop the pictures). Alt + PrtSc will produce a screenshot of only the selected window.
Cause of error for line 2209 is in function "getFarmFactors" of expansion.gd (line 2306 for me). It's returning a string, but function "dailyMilking" is expecting a bool. Change the first 2 lines:
var result = str(person.farmexpanded[factor])
if result == "default":
to(1 tab each):
var result = person.farmexpanded[factor]
if typeof(result) == TYPE_STRING && result == "default":
Edit: grammar
"expansion.dailyNPCs" will not work, because "expansion" is not a variable inside of Mansion.gd.
The function "dailyNPCs" exists inside of expansion.gd, and that file is loaded by globals.gd into the variable "expansion". Thus "globals.expansion.dailyNPCs" is a correct path.
Edit: "globals" is not a variable inside Mansion.gd either, but it is specially defined by the project settings to be present in all scripts.