Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to get class name from Scripts.rxdata?
#1
I am trying to port Hime's Full Error Backtrace script to RPGmXP (this one)

It works fine as is (as long as you have that recently posts Console script) except that I get things like "Section086" instead of "Game_Player" so I can assume it is stored in a different place in scripts.rxdata.

here is the code if it helps (add it into the Main method)
Code:
rescue Exception => error #Exception => error
  scripts_name = load_data('Data/Scripts.rxdata')
  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 =~  /\A:1:/
      break
    else
      backtrace << line
    end
  }
  error_line = backtrace.first
  backtrace[0] = ''
  out_string = error_line + ": " + error.message + " (#{error.class})" + backtrace.join("\n\tfrom ") + "\n"
  console.log( out_string)
  raise  error.class, "Error ocurred, check the debug console for more information.", [error.backtrace.first]
Reply }


Messages In This Thread
How to get class name from Scripts.rxdata? - by MechanicalPen - 07-31-2013, 10:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Icon Display 1.0 scripts makes events impossible to go to events, which are passable Djigit 0 3,589 01-03-2015, 09:11 PM
Last Post: Djigit
   looking for day/night/weather scripts: Ahzoh 2 4,419 07-31-2013, 05:25 AM
Last Post: Ahzoh
   RXDATA layout? Myownfriend 4 7,045 04-09-2013, 02:17 PM
Last Post: Myownfriend
   Modifying Actor ID to Class ID for Advanced Individual Battle Commands Script NewHope 1 4,187 07-11-2012, 11:37 PM
Last Post: NewHope
   MrMo's ABS Ultimate and Other Scripts Erechel 6 8,415 05-07-2012, 03:37 AM
Last Post: Erechel
   Replace the AUDIO class for RMXP! DerVVulfman 8 13,927 10-15-2010, 06:29 PM
Last Post: yamina-chan
   Combine two scripts Kerdukie 0 3,028 12-25-2009, 02:16 AM
Last Post: Kerdukie
   Calling Scripts aistinger 3 5,232 12-03-2009, 01:41 AM
Last Post: aistinger
   Sideview Tankentai XP & SDK Scripts Ravenith 1 4,987 08-26-2009, 03:01 AM
Last Post: DerVVulfman



Users browsing this thread: