Error with team following script

I'm using "Squad Movement" script (made by Near Fantastica) and this happens sometimes. I've had this error before but managed to get rid of it by creating a new project (I allowed myself to do that because I basically did nothing for my project except for models) but now that I actually did something I need to fix it, not restart.

This time this happened after I tried to make a summoning ability. I've used "Beast01" battler graphic, so no "outside intereference" with this one. This also happens when I'm not using any graphics at all.
1737764613472.png


This is the script the error refers to: "if $scene.spriteset != nil"
1737764918874.png

I've literally never coded anything in my life so I'm literally stumped.
You can change that line to
Code:
if $scene.is_a?(Scene_Map) && $scene.spriteset
instead of working around errors it is usually better to fix them.

basically such undefined errors can only have three different causes:

1) the script you're using requires a different script that you're missing and that contains the definition

2) you loaded an older and now incompatible savefile (a lot of scripts store information into savefiles and need a "new game" to set themselves up correctly. This can make saves from before adding a script incompatible, causing such and similar errors.

3) some part of the script is configured wrong, and that wrong configuration pointed to something not correctly defined.

(of course that is assuming the script in question can function and was tested by the original programmer. If that script was never fnished then of course anything can go wrong)
The script was probably designed without the thought of adding party members during battle. After all, it's a caterpillar script, where the effects happen only on the map.

Original thread: https://forums.rpgmakerweb.com/threads/error-with-team-following-script.174935/