MOG's Script issue - Battle Command EX - Bug(?) in-battle test

Discussion in 'RGSSx Script Support' started by berslayer, Apr 20, 2018.

  1. berslayer

    berslayer Villager Member

    Messages:
    9
    Likes Received:
    0
    Location:
    Venezuela
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Hello everyone! Welp, I have a problem when testing a battle and, apparently, is with an execution in a line on the title's script. The thing is, when I choose an item (any, literally; consumable or not, even an "===KeyItems===" slot on the database to divide types of items, for example) it appears a message. Check: ---> https://i.imgur.com/Kiy6TS8.png

    I really never experienced such a thing when in-battle testing. Therefore I don't know where I did go wrong. So, if it's possible, I'll appreciate if someone explain what is going on. Look this image ---> https://i.imgur.com/nlUpgos.png, there are all the scripts I'm using so far. Perhaps the problem root hangs somewhere there (idk). Also, I emphasized the line in question.

    Beforehand, I apologies if there something I did not write correctly, I mean, grammatically. English isn't my native language.
    Nothing else. I'll wait patiently for an answer. Thank you!

    Summary: ---> https://i.imgur.com/52wMVau.png
     

    Attached Files:

    #1
  2. SweetMeltyLove

    SweetMeltyLove Veteran Veteran

    Messages:
    110
    Likes Received:
    149
    Location:
    Brazil
    First Language:
    English
    Primarily Uses:
    RMVXA
    Run the game with the console enabled (Game > Show Console) and replace your Main script with this:

    Code:
    #==============================================================================
    # ** Main
    #------------------------------------------------------------------------------
    #  This processing is executed after module and class definition is finished.
    #==============================================================================
    
    begin
      rgss_main do
        begin
          SceneManager.run
        rescue RGSSReset
          Graphics.transition(10)
          retry
        end
      end
    rescue SystemExit
      exit
    rescue Exception => error
      scripts_name = load_data('Data/Scripts.rvdata2')
      scripts_name.collect! {|script|  script[1]  }
      backtrace = []
      error.backtrace.each_with_index {|line,i|
        if line =~ /{(.*)}(.*)/
          backtrace << (scripts_name[$1.to_i] + $2)
        elsif line.start_with?(':1:')
          break
        else
          backtrace << line
        end
      }
      error_line = backtrace.first
      backtrace[0] = ''
      print error_line, ": ", error.message, " (#{error.class})", backtrace.join("\n\tfrom "), "\n"
      raise  error.class, "Error ocurred, check the debug console for more information.", [error.backtrace.first]
    end
    Then you'll see the full error printed in the console so it's easier to find the problem
     
    #2
    berslayer likes this.
  3. berslayer

    berslayer Villager Member

    Messages:
    9
    Likes Received:
    0
    Location:
    Venezuela
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Cool! Gonna see what is going on. I'll reply another if there's any news. Thanks.

    EDIT:
    Mmm... So, this means the problem originates because all what is showed? If so then I have to educate me little more to solve it. Anyway, if there's anything that you could suggest to me additionally, I'll be grateful. Thanks for the support. Help4.png
     
    Last edited: Apr 20, 2018
    #3
  4. SweetMeltyLove

    SweetMeltyLove Veteran Veteran

    Messages:
    110
    Likes Received:
    149
    Location:
    Brazil
    First Language:
    English
    Primarily Uses:
    RMVXA
    It just lists the path that the code was taking up until it hit the error. Sometimes it helps you find which scripts are interacting so you can find conflicts

    Anyway, if you change COMMAND_NAME (around line 132) from true to false does the error persist?
     
    #4
    berslayer likes this.
  5. berslayer

    berslayer Villager Member

    Messages:
    9
    Likes Received:
    0
    Location:
    Venezuela
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Still trying to solve de issue. I just verified what you say about the COMMAND_NAME, and the line 808 it's not the problem anymore but the line 1044. So basically, the error persist. Saying I need assist yet not want to stick anyone with this so then, I appreciate the support. Thaaanks!
     
    #5
  6. berslayer

    berslayer Villager Member

    Messages:
    9
    Likes Received:
    0
    Location:
    Venezuela
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Well. Looks like the issue disappeared. I just erased the line 1044 from the script and now I'm capable to heal my combatants with a potion or a "===KeyItems===" slot from the database and the game runs ordinary. I'm about to test any other ways to clean it up so that I can find any other flaws. I think this thread might be closed soon. Thanks once more hahaha
     
    #6
  7. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Do you know how to script? How do you know that was the correct thing to do and isn't going to break something else for you? The line was there for a reason.

    Does the issue happen only when you're doing Battle Test from the Troops tab, or also when you do Test Play to play the game properly and enter a battle? If it's only when you Battle Test from the Troops tab, then it's not an issue. A lot of scripts do setup stuff when the database is loaded, but when you do a Battle Test, it doesn't do the normal load database, so those scripts don't do their setup stuff. You should not expect battle scripts to work properly when you're just doing a Battle Test.

    So if that's what you've done, my suggestion would be to put that line back in there, and don't use Battle Test.
     
    #7
  8. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,146
    Likes Received:
    10,310
    First Language:
    English
    Primarily Uses:
    RMVXA

    berslayer, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.



    If you want to add something, just edit your earlier post to include the additional information/comment.

    I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    Last edited: Apr 26, 2018
    #8

Share This Page