Error Message Caused by Old Code in Mod - Help Appreciated

Posting this here in case I can get some help. I’m getting an error which is preventing a mod I have on the game from working properly. It didn’t used to do this in an older experimental I played (though it has been a while since I last played and I don’t remember which the last experimental I used was). Does anyone know how to fix this? Please see the below screenshot for the error message.

Here is an example of how to fix the mod:

Thanks, I think that fixed it.