(Solved) Using a space at the border crashes the game. (GalvMS,yanflymessage_x_1,dhoom message SE.)

So, I noticed my font was cliping when using the \pop[#] command and added an space infront of the sentence.
Spoiler
Screenshot (48).png
that happened, but when I don't use a space it works fine. My setting are:
dhoom SE and galv's
Spoiler
Screenshot (49).png

Screenshot (51).png
I'm not sure what's exactly wrong but I do know what causes it (When you put a space instead of a letter at the left border of the text editor, it happens when you confirm to go to the next dialogue with the OK button)
It would be helpful to provide links to the plugins you're discussing; I'll do it this time. 😴
Looks like Dhoom's Message SE plugin checks for spaces because it has a "sound per word" option. Due to the way the plugin is written, it'll try to match the character before the space, which is nothing in this case, causing the error. At time of writing this, the plugin seems to be licensed under Apache 2.0 (permits modification), so you could try changing line 260 of the plugin:
Code:
} else if (textState.text[i - 1].match(/[^.!?'"]/g)) {
...to this:
Code:
} else if (textState.text[i - 1] && textState.text[i - 1].match(/[^.!?'"]/g)) {
...i.e. check if the preceding character exists (a.k.a. is truthy) before attempting the match. 🙏

[Edited link to DrDhoom's plugin thread here on RMW rather than straight to github.]
thank you for solving it. I'll try to remember the links next time.
It works? Great, happy RPG Making~ 😂
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/solved-using-a-space-at-the-border-crashes-the-game-galvms-yanflymessage_x_1-dhoom-message-se.111146/