Khas Awesome Light Effects Line 680 Error?

Hello everyone,

I've been having some trouble with the "Khas Awesome Light Effects" script.

Whenever I create an event, set a "Comment: [light 0]" I get an error when starting the game

I really suck at scripting and understand very little of it.
I honestly don't know what I did wrong.

I looked at tutorial videos, mimicked exactly what they did and still got this...

(The lantern/flashlight option does work)

This is the code the error is referring to,

unless dispose && @list.nil?for command in @listif command.code == 108 && command.parameters[0].include?("[light")command.parameters[0].scan(/\[light ([0.0-9.9]+)\]/)effect = Light_Core::Effects[$1.to_i]@light = Light_SSource.new(self,effect[0],effect[1],effect[2],effect[3])$game_map.light_sources << selfreturnendendendendthis one specifically (line 680)

@light = Light_SSource.new(self,effect[0],effect[1],effect[2],effect[3])Does anyone have any idea how to fix this?
It seems that it doesn't find any effect setting for the "0" value. Are you sure that you set an effect for "0" at the beginning of the script ?

Code:
module Light_Core  Effects = { #  <= DON'T change this!#-------------------------------------------------------------------------------# PUT YOUR EFFECTS HERE!#-------------------------------------------------------------------------------  0 => ["light",255,45,true],  1 => ["torch",200,20,true],  2 => ["torch_m",180,30,true],  3 => ["light_s",255,0,true],  4 => ["torch_m",110,40,true],  #-------------------------------------------------------------------------------# End of effecs configuration#-------------------------------------------------------------------------------   } #  <= DON'T change this!
I copied and pasted your part into my script and I was able to start the game!

It was quite odd, because the 0 value was there, but the colors of the words did change when I pasted it, so I guess it wasn't entered correctly or something.

Everything working now, so I can finally start to fully utilize this script.

Thanks so much!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/khas-awesome-light-effects-line-680-error.16422/