Opposite of \lastGet (Plugin Edit)

I try editing "Last Get" Text plugin for an opposite counterpart, "Loss Get"

About "Last Get" Text plugin-
When using \lastGet in Text, it'll display icon and item name in message.

Features
- Shows icon and item name in text
- Also include text for gold increase

Example-
6YCUiwH.png


For "Loss Get"
On event page, I subtracted a potion by 1
Then Show Text: You lose \lossGet !
Also subtracted gold by this amount -1234
Follow by Show Text: You lost \lossGet !

However \lossGet appears like this in Text Window.
"You lose !"
"You lost !"
On \lossGet, the name and the icon suppose to show.

Note: Quantity of potion is more than 1 from the start. "Last Get" isn't affected.
"Last Get" and "Loss Get" appears to work together, there are no error popups.

\lastGet (original) download:
https://www.dropbox.com/s/oywgu4213fvaucf/Torigoya_TextLastGet.js?dl=1

\lossGet (edited) download:
https://www.dropbox.com/s/8otag963x9pd9bh/Torigoya_TextLossGet.js?dl=1

Edits I done are cheap with changing variable phrases.
Maybe the issue has something to do with this line?
Code:
if (amount < 0) {
Hi, you have a couple of mistakes. The largest one is you accidently called 'Window_Base.prototype.processEscapeCharacter' for Window_Base.prototype.processEscapeCode. Which means that it wouldn't even process '\lossGet'.

The other mistake isn't as obvious. You use 'Game_Party.prototype.loseItem' instead of 'Game_Party.prototype.gainItem'. This may seem weird, but the 'Change Items' event command calls 'Game_Interpreter.prototype.command126' which calls 'Game_Party.prototype.gainItem' here you should actually use 'if (amount < 0) {' as when you lose an item the amount is negative in 'gainItem'. 🙂
Shoot, I forgot to update dropbox link with the project js file with "Window_Base.prototype.processEscapeCharacter" change. Thanks for pointing that out.

Ah, it's fine to use 'if (amount < 0) {' when 'Game_Party.prototype.gainItem' is called. Not much to edit other than setting \lossGet, amount > to < 0.

Thank you for the explanation 🙂 Able to get \lossGet showing.

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/opposite-of-lastget-plugin-edit.110107/