Modern Algebra's XVA Quest Journal Help

Hello guys,

I am having a problem using the aforementioned script. When I activate the scene either from a key shortcut or from the menu, I get an interpreter error.

#==============================================================================

# ** MA_Window_ParagraphFormat

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#  This module inserts into Window_Base and provides a method to format the

# strings so as to go to the next line if it exceeds a set limit. This is 

# designed to work with draw_text_ex, and a string formatted by this method 

# should go through that, not draw_text.

#==============================================================================

 

module MA_Window_ParagraphFormat

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  # * Calc Line Width

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  def mapf_calc_line_width(line, tw = 0, contents_dummy = false)

    return tw if line.nil?

    line = line.clone

    unless contents_dummy

      real_contents = contents # Preserve Real Contents

      # Create a dummy contents

      self.contents = Bitmap.new(contents_width, 24)

      reset_font_settings

    end

    pos = {x: 0, y: 0, new_x: 0, height: calc_line_height(line)}

    while line[/^(.*?)\e(.*)/]

      tw += text_size($1).width

      line = $2

      # Remove all ancillaries to the code, like parameters

      code = obtain_escape_code(line)

      # If direct setting of x, reset tw.

      tw = 0 if ($imported[:ATS_SpecialMessageCodes] && code.upcase == 'X') ||

        ($imported["YEA-MessageSystem"] && code.upcase == 'PX')

      #  If I need to do something special on the basis that it is testing, 

      # alias process_escape_character and differentiate using @atsf_testing

      process_escape_character(code, line, pos)

    end

    #  Add width of remaining text, as well as the value of pos[:x] under the 

    # assumption that any additions to it are because the special code is 

    # replaced by something which requires space (like icons)

    tw += text_size(line).width + pos[:x]

    unless contents_dummy

      contents.dispose # Dispose dummy contents

      self.contents = real_contents # Restore real contents

    end

    return tw

  end
It's a 1484 error saying no capital for nil.class. I do have the Yanfly menu script.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


RGSS3 Scripts (VX Ace) is for completed scripts that you have written 🙂
I'm really sorry about that- it's been a while since I've been here  :blush:  

Would you be able to assist me?
No "capital"?
yh7n.png
What do you mean by this

When I activate the scene either from a key shortcut or from the menu
So for example if you want to open the menu you just press X key?
There's a setting to where I can press L which is W on my keyboard and it won't come up. If I select it from the regular menu like any other scene it gives me the same error. The only time it did work was when I accidentally had it linked up to a common event that activated when I pressed Q.
You'll probably have to show how you set up that shortcut cause it's not built into the default engine, including the script you are using.
fmiw.png


 


3uim.png


 
It's likely one of your show text or show choices strings. I don't know which one it is just by looking at it.


You'll have to figure out a way to check which one is causing the problem.
Would I need to go into the Yanfly message script and see what's going on in there in order for it to work?
It shouldn't be necessary.


From my experience, this error usually occurs when one of the special codes used in your show text or show choices is wrong.


I'm just not sure which one it is.
EDIT: I found out what it was. In the language, if I were to use YF Messages, I would need to do \\c[0] instead of \[c0]. Basically I spent all day trying something that only needed a simple fix. Thanks for helping.
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/modern-algebras-xva-quest-journal-help.16260/