Moghunter - Treasure popup plugin bug.

Recently I decided to add into my game some cosmetic "touch" and I've installed Treasure Popup plugin. I have modified version of this plugin by @Kyo Panda from this thread.

Problem with this plugin occurs when the "treasure" name is floating on screen and in the same moment I decide to do one of the followings:

- go to main menu with ESC key
- start a battle
- transfer to another location.

When one of these three events occurs while the floating text is still visible game crashes with error
Code:
Type Error: Cannot read property "x" of undefined.

I checked console for more details and I think it will have to do something with SceneManager but I'm not 100% sure of that.
I'm going to suggest that it's caused by switching from Scene_Map to another scene, but it would be useful if you could show the full console error. This lets people see what plugin is producing the error and where in the plugin it's happening.

Spoiler
upload_2019-11-10_16-24-30.png

I can see immediately that the error above is being generated by the plugin "SilvaYanflyCCCExtend" at line 62.
@Silva, as you asked, here is screen from my console.
https://prnt.sc/pv0bfh
Some of the information I was expecting on the right is clipped and I can't replicate the issue, but I'm going to hazard a guess and say that there's something wrong with the scale on some of the treasure icons and that's what's causing the problem.

You mentioned you're using a modified version of the plugin, does the error still occur if you use the normal version?
No. I've downloaded updated, clean version about 20 minutes ago and there is no problems, except with items with long names. Text just squezes making it unable to read, but I think I just shorten some items names. Unless someone points me where to fix code.
I would suggest sticking with the clean version then. Seems like that modified version has some issues. If you want to change the width of the pop up boxes you can use this instead.

https://www.dropbox.com/s/zmmauzjvhahgu33/SilvaMOGTPUExtend.js?dl=0
Thank you, works perfectly 🙂

Original thread: https://forums.rpgmakerweb.com/threads/moghunter-treasure-popup-plugin-bug.115107/