YEA Input Combos & Area of Effect script errors

hello there folks!

I'm get a no method error with Yanflys Input Combo Skills script. I know exactly what's causing it, but as my code knowledge is limited I'm at a loss to know how to fix it. I have a temporary work around, but it's not ideal, and the error will still pop under the right circumstances.

So here's how it happens:
I have a skill that sets off the input combo. This skill hits multiple random targets, and then has a follow up attack.

The error occurs ONLY when the very first attack KO's the enemy. If the first hit doesn't kill the enemy, but the second/third etc do, the error does not happen. Just the first hit.
The error pops up as:
No method error, input combo skills, Undefined def for 'visible' for nil:nilclass line 655

Here's the github for the script:

https://github.com/Archeia/YEARepo/blob/master/Gameplay/Input_Combo_Skills.rb

Any assistance would be greatly appreciated! Thanks in advance.
Cheers
~Lit
Try to replace the error line with this:
Code:
return unless @input_combo_skill_window && @input_combo_skill_window.visible
This should get rid of the crash issue, but no idea if this leads to another crash or some other bugs or not.
Test it out, maybe it will work without more issues.
Typing that into that line gives me this error
You didn't type what I wrote, I can see several errors just from that error message box.
Copy the code line I wrote and replace line 655 with it.
You didn't type what I wrote, I can see several errors just from that error message box.
Copy the code line I wrote and replace line 655 with it.

Derp, you're right I didn't type it all properly. Seems to be working just fine now!
Thank you so much! ^-^

*EDIT*

Ironically while testing this one (your solution resolved this perfectly, this other error is not related because I've had it pop before), I got a similar error, under similar circumstances from Yanfly's Area of Effect script. Line 461.

The problem:
I have an area of effect item (it's a bomb/grenade) that you toss at the enemy and it deals damage. When you kill the enemy with a bomb, a No Method Error - almost identical to the one I listed above, pops for line 461

This is what line 461 says:
Code:
if SceneManager.scene.enemy_window.visible

Can I adapt your fix for Input Combo's for this one?

Cheers
~Lit
Replacing that error line with this one:
Code:
if SceneManager.scene.enemy_window && SceneManager.scene.enemy_window.visible
Should get rid of that error as well.
But again, there might be other issues even after applying this fix.
You sir/miss/etc are a peach! Thank you, greatly appreciated.
If something else crops up, I'll post here.

Cheers
~Lit

Original thread: https://forums.rpgmakerweb.com/threads/yea-input-combos-area-of-effect-script-errors.83453/