Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 14th Feb 2022 at 11:42 AM
Default Please help, script error.
I don't know what I'm doing, just flailing around hoping to get it right!
I am trying to make some functional farm animals similar to Danjaley's functional hen found here

Example: I want to make the functional hen harvest 'chicken breast' from the cooking overhaul mod by Cinderellimouse.
I edited the mod to make the chicken breast a plant, and I made an auto soil with douglasveiga's CCLoader. Both work in game however the script from that auto soil can't be used with the hen.

I need to make auto soils without the CCLoader, So I copied the steak script from Sims MX's missing auto soil it reads as follows

So I made my relevant changes and mine now reads

However it comes up with the error CS0516: Constructor 'SoilAutoPlantChickenBreast.SoilAutoPlantChickenBreast()' cannot call itself
I am at a complete loss as to what I'm missing/where I went wrong, please help.
Advertisement
Space Pony
#2 Old 14th Feb 2022 at 1:43 PM
You'll need to remove the ": this()" line from your code. I don't know how that got in there in the first place; just add that to the list of things ILSpy gets wrong sometimes, I guess.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Test Subject
Original Poster
#3 Old 14th Feb 2022 at 10:15 PM
Quote: Originally posted by gamefreak130
You'll need to remove the ": this()" line from your code. I don't know how that got in there in the first place; just add that to the list of things ILSpy gets wrong sometimes, I guess.

Thank you, this seems to have worked.

However new problem has occurred when I add this into my mods folder the game wont launch. Remove it and the game launches. Anyone know what I've done wrong now?
I was semi following this tutorial here in regards to how to set up and add the script to your game.
Back to top