MZ Problem with a cooldown plugin

Hello, sorry it's me again...

I'm testing Fomar's cooldown plugin and everytime I open the skill tab of the character having one skill designed for cooldown it gives me this error message :
"TypeError
Failed to execute 'getImageData' on 'CanvasRenderingContext2D': Value is not of type 'long'."

I then tried Theo Allen (RIP)'s simple cooldown plugin and it gives me the exact same error message.
I did put <cooldown: 3> in the note box of the skill , I tried with no space before the number too to no avail, same error messages.

It seems t's about graphics and I'm at a loss because there is no mention of including graphics anywhere in the plugin?
Could someone explain me what is wrong?

Thank you 🙂
Hiya!

If two separate plugins both throw up the same error message, my understanding here would be that perhaps another plugin is the cause of such an issue. Since, as you say, I don't believe cooldown plugins would necessarily interface with that sort of thing, unless they were doing something fancy.

Have you attempted to use either with other plugins of yours disabled to see if it is indeed just them causing the issue? Always good to narrow it down and slowly disable everything else until you're absolutely sure!

Otherwise, giving us a full plugin list of everything you currently have installed to ensure correct plugin order and what may be causing a clash will be handy!
Also:
  1. Did you remember to save your project to apply Plugin Manager changes before testing? If not, then you just ran the same test 3 times [edit: twice], which would explain why the error was the same every time.

  2. After the error occurs, press F8 or F12 to show the dev tools window, and check the Console tab. There should be a more detailed error trace there, in red text. A screenshot could help, to narrow down the specific origin for the error.

  3. I don't think a cooldown plugin would typically use getImageData directly. The only uses of getImageData in the core scripts are for text colours (e.g. \c[n]) and the pending cursor colour. The pending cursor uses fixed coordinates, though, so it may be a problem with a non-numeric text colour index.

    In that case, perhaps you didn't set up a plugin's parameters correctly, and/or renamed a plugin (which, for many plugins, will cause them to fail to see their own parameters).
Also:
  1. Did you remember to save your project to apply Plugin Manager changes before testing? If not, then you just ran the same test 3 times, which would explain why the error was the same every time.

  2. After the error occurs, press F8 or F12 to show the dev tools window, and check the Console tab. There should be a more detailed error trace there, in red text. A screenshot could help, to narrow down the specific origin for the error.

  3. I don't think a cooldown plugin would typically use getImageData directly. The only uses of getImageData in the core scripts are for text colours (e.g. \c[n]) and the pending cursor colour. The pending cursor uses fixed coordinates, though, so it may be a problem with a non-numeric text colour index.

    In that case, perhaps you didn't set up a plugin's parameters correctly, and/or renamed a plugin (which, for many plugins, will cause them to fail to see their own parameters).

Hello!

Ah now that makes sense! Seems like I forgot to save like the big dumby I am! So now, the one by Theo Allen (the simple plugin) works perfectly! The other one though asks me to input a numerical value for the color of the cooldown text and I had absolutely no idea of which one to insert so I tried my luck with 0,1 and then other numbers. Seems like you did put the finger exactly on where the problem was! Thank you!
Great! 😂

Just for reference: Fomar's Skill Extensions plugin should be saved as Fomar0153_SkillExtension.js. That parameter should accept any value that would be valid for \c[n], including 0 or 1. Otherwise it looks OK (I haven't tested it myself).

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-a-cooldown-plugin.168513/