Help with $gameMessage and storing dialogue

Hello!

Brief summary. I'm wanting to make a Visual Novel-like dialogue logbook, where the latest dialogue spoken by a character is stored in a menu.

I'm a novice at JavaScript, so what I thought is to push $gameMessage into an array I made in my custom plugin, and show that array's content in a window. There's two problems that arise from this:

First, all dialogue in itself doesn't appear at all. Secondly, if I do open any type of menu (options, save, or general menu) this appears:

tQ9Hru7.png


So my question is, is it a good way to make this kind of system by using $gameMessage? Or is there another, more efficient way to do it? If it is the right way to do it, am I doing it wrong and is there some way to mend it?
$gameMessage is an object. If you want some kind of log, you'd want to catch $gameMessage._texts (it's an array).
That beeing said, be aware that it only has text in it while the message is displayed on screen.

Concerning your second problem, this probably has to do with how you coded your custom plugin, but without seeing the code itself we can't help you much.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-gamemessage-and-storing-dialogue.95286/