Adding New Item Categories in Modern Algebra's Customizable Item Menu

Discussion in 'RGSSx Script Support' started by Mawichan, Jan 24, 2018.

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

    Mawichan Veteran Veteran

    Messages:
    55
    Likes Received:
    6
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Hello, I'm new to creating threads, so I hope I'm not posting in the wrong section.

    Im having a problem with the Customizable Item Menu by Modern Algebra.

    Link to Script Explanation Page
    Link to Script on Pastebin

    I want to add two item categories to the Item Menu. I followed the instructions of the script as much as I could, however when I run a play test I get a NoMethodError.

    The game starts, the main menu opens, the item menu opens. It shows the icons for the two item categories I added, but the moment I move the cursor to either of the two item categories the game crashes and I get these messages:

    Script 'custom item menu' line 650: NoMethodError ocurred.
    Undefined method 'ores' for Vocab:Module

    Script 'custom item menu' line 650: NoMethodError ocurred.
    Undefined method 'souls' for Vocab:Module

    It looks like this

    upload_2018-1-23_13-53-7.png

    upload_2018-1-23_13-55-54.png

    upload_2018-1-23_13-57-15.png

    This is what line 650 of the script looks like



    I'm pretty sure the error is my fault. I think there's an instruction I didn't understand well or didn't follow correctly.
    The problem is my lack of scripting knowledge won't allow me to understand what the error means and what part of my input into the script is causing the error.

    There's a section in the instructions that says:

    (...) all you need to do is first create a symbol for the category and add it to the array below. This can be anything as long as it is unique and in the format:
    :unique


    The example given is custom_categories: [:item, :potion, :weapon, :armor, :key_item]
    The array of categories for what I want would be something like [:item, :weapon, :armor, :key_item, :ores, :souls]

    I'm unsure whether this is related to the problem, but when the instructions say "create a symbol" the symbol is the word that follows the colon (like ":potion")? Or is it something else?

    This is what my script looks like

    Sorry for the long post but I hope the information provided is a good start to find the root of the problem or a solution.
    Any help or guidance will be greatly appreciated.
    Thank you for your time.
     

    Attached Files:

    Last edited: Jan 24, 2018
    #1
    Romanticist likes this.
  2. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    800
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    It happens because you made the settings like this:
    Code:
      :ores =>     :"Vocab::ores",
      :souls=>     :"Vocab::souls",
    That won't work, since the Vocab module got no such things defined by default, which is what the error tells too.
    You should name your custom categories directly there, like:
    Code:
      :ores =>     "Ores",
      :souls=>     "Souls",
    And it should work than.
     
    #2
  3. Mawichan

    Mawichan Veteran Veteran

    Messages:
    55
    Likes Received:
    6
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    You're absolutely right. It's working perfectly now. Thank you very much for your help and timely reply ;w;
     
    #3
  4. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,979
    Likes Received:
    10,677
    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.

     
    #4
Thread Status:
Not open for further replies.

Share This Page