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

Discussion in 'Javascript/Plugin Support' started by Yougotsomechocolate, Jul 17, 2019.

Thread Status:
Not open for further replies.
  1. Yougotsomechocolate

    Yougotsomechocolate Random Chest Veteran

    Messages:
    155
    Likes Received:
    66
    First Language:
    English
    Primarily Uses:
    RMMV
    So, I noticed my font was cliping when using the \pop[#] command and added an space infront of the sentence.
    Screenshot (48).png
    that happened, but when I don't use a space it works fine. My setting are:
    dhoom SE and galv's
    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)
     

    Attached Files:

    #1
  2. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,045
    Likes Received:
    653
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    It would be helpful to provide links to the plugins you're discussing; I'll do it this time. :kaoslp:
    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. :kaothx:

    [Edited link to DrDhoom's plugin thread here on RMW rather than straight to github.]
     
    Last edited: Jul 18, 2019
    #2
  3. Yougotsomechocolate

    Yougotsomechocolate Random Chest Veteran

    Messages:
    155
    Likes Received:
    66
    First Language:
    English
    Primarily Uses:
    RMMV
    thank you for solving it. I'll try to remember the links next time.
     
    #3
  4. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,045
    Likes Received:
    653
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    It works? Great, happy RPG Making~ :kaojoy:
     
    #4
  5. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,072
    Likes Received:
    3,402
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA

    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.

     
    #5
Thread Status:
Not open for further replies.

Share This Page