comment out line 121 of rangeturrets.lua.
if all assignment attempts to base fail (in function on line 103), then line 122 will not run, which means the check on 121 is irrelevant. "if not base" does not need to be errored because the next line is "if base then",such that, nothing occurs if an attempt to change would cause a legit error.
But it also looks like that alone isn't enough, other errors in endgame combat get thrown after fixing this. damn.