Picture Variable script RGSS Error

I found this script in the VXACE repository thread. I'm using Picture Variables by neonblack. Can be found here.
It's a script that changes pictures depending on the variables' value. You can read all about how it works in the link.
Anyway, I'm pretty sure I am doing everything correctly. I've read through the instructions many times but I keep getting an error that says:
Script 'Sprite_Picture' Line 29: RGSS Occured.
disposed sprite

This error occurs when I set the variable value to anything higher than zero, after the corresponding switch is turned ON.
please show us your configuration of the script, then we can check what you need for it to work.
Basically everything until the line "end of configuration"

please use code-tags to make sure it remains readable code
please show us your configuration of the script, then we can check what you need for it to work.
Basically everything until the line "end of configuration"

please use code-tags to make sure it remains readable code
So sorry, I just figured out what was causing the error. On line 50 where it says:
Code:
0 => nil,
I replaced the 'nil' with quotation marks and that fixed the problem. I never bothered to change that since it was a part of the og script. Thanks anyway!
no, that doesn't fix your problem - it only hides the error message.
There is a reason why the original scripter placed the nil there, and that you got to that message means that you used the script in the wrong way or configured it wrong.
Placing an empty string as a filename will never work correctly...
no, that doesn't fix your problem - it only hides the error message.
There is a reason why the original scripter placed the nil there, and that you got to that message means that you used the script in the wrong way or configured it wrong.
Placing an empty string as a filename will never work correctly...
It seems to work fine though, even when the variable value is set to zero. But just in case, here's my configuration.
Spoiler
Code:
VARIABLE_SWITCHES ={
1 => 1,
}

PICTURE_VIEWPORT ={
1 => 2,
}

PICTURE_Z ={
1 => 1,
}

Pictures[1] ={
0 => '', #< --- originally nil
1 => 'pic1',
2 => 'pic2',
}

FIX_MAP ={
1 => true,
}

TINT_MAP ={
1 => true,
}

Original thread: https://forums.rpgmakerweb.com/threads/picture-variable-script-rgss-error.109831/