Forum Discussion
8 years ago
@Neia That's odd. Because in the script for no auto enroll at all, I did this:
And it works fine. So if the "original" part at the end is calling the vanilla function, why does it not cause the same issue for this script? (Edit: Oh, I wonder if it's the return part that saves this method from disaster... return causes it to move on rather continuing on and hitting the original method?)
I guess I've misunderstood something about the original call. The reason I had it in there at all is because I was getting nothing but errors if I left it out completely. I want to overwrite the existing script, but simply writing to it without that "original" call at some part of it doesn't seem to work. Maybe there is no way to overwrite it without errors. I dunno.
I'm confused.
@Triplis_School_Push_Injector.inject_to(sims.sim_info.SimInfo, "ensure_age_based_career")
def my_ensure_age_based_career(original, self, age, career):
has_career = career.guid64 in self.careers
if self.age == age:
if not has_career:
return
elif has_career:
self._career_tracker.remove_career(career.guid64, post_quit_msg=False)
original(self, age, career)
And it works fine. So if the "original" part at the end is calling the vanilla function, why does it not cause the same issue for this script? (Edit: Oh, I wonder if it's the return part that saves this method from disaster... return causes it to move on rather continuing on and hitting the original method?)
I guess I've misunderstood something about the original call. The reason I had it in there at all is because I was getting nothing but errors if I left it out completely. I want to overwrite the existing script, but simply writing to it without that "original" call at some part of it doesn't seem to work. Maybe there is no way to overwrite it without errors. I dunno.
I'm confused.
About The Sims 4 Mods & Custom Content
Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.14,700 PostsLatest Activity: 3 years ago
Recent Discussions
- 2 hours ago
- 2 hours ago
- 4 hours ago
- 6 hours ago
- 8 hours ago