Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

TypeError

Status
Not open for further replies.

Fablerede

Villager
Xy$
0.00
Why am i getting this error in these yanfly scripts?

TypeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': float parameter 1 is non-finite.
at TypeError (native)
at Bitmap.getPixel (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/rpg_core.js:1195:30)
at Window_TitleCommand.Window_Base.textColor (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/rpg_windows.js:176:28)
at Window_TitleCommand.Window_Base.normalColor (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/plugins/YFCore.js:4518:15)
at Window_TitleCommand.Window_Base.normalColor (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/plugins/YEP_ItemCore.js:1358:48)
at Window_TitleCommand.Window_Base.resetTextColor (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/rpg_windows.js:106:31)
at Window_TitleCommand.Window_Base.resetFontSettings (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/rpg_windows.js:102:10)
at Window_TitleCommand.Window_Base.resetFontSettings (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/plugins/YEP_MessageCore.js:687:50)
at Window_TitleCommand.Window_Base.createContents (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/rpg_windows.js:96:10)
at Window_TitleCommand.Window_Base.initialize (file:///C:/Users/maxam/Documents/Games/Harem%20Quest/js/rpg_windows.js:24:10)
 

Essy

Towns Guard
Xy$
0.00
You should provide more information such as how the error is being triggered. Is it on script initialization? Is it only when using some sort of command?

Parameter 1 is "The x coordinate of the upper left corner of the rectangle from which the ImageData will be extracted."

What immediately comes to mind to me is that parameter (and likely the others) aren't being properly loaded. This may be because the image itself hasn't finished loaded by the time the instruction is called.

Apparently this issue was common in a lot of YF's older scripts, so make sure you're using the most current versions.

Also, this forum isn't for support questions. Instead of asking here I highly suggest seeking support from one of the script sources posted by YF themselves.
 

Essy

Towns Guard
Xy$
0.00
Try disabling every non-related plugin. It looks like it needs YFCore, YEP_ItemCore, and YEP_MessageCore so disable everything except those.

It might be a compatibility issue. If this fixes the issue try turning on one plugin at a time until the error resurfaces. Since I'm not actually too familiar with YF's scripts this is probably the most help I'll be able to give. If it is a compatibility issue you'll probably have to decide on what plugin to cut (or contact the plugin creator to see if they can make it compatible.)
 

Fablerede

Villager
Xy$
0.00
hmm it might just be a compatibility issue, i disabled all the plugins except those three and it still throws me back the error
[doublepost=1517792504,1517780400][/doublepost]so it turns out that it was throwing me the error because i had renamed the js file -.-
 
Status
Not open for further replies.
Top