rey meustrus
Sponsor
What I'm saying is, when I test play, $TEST == false, and $DEBUG == false. There is no indication the editor has set any debug variables at all.
begin
 Graphics.freeze
 $scene = Scene_Title.new
 $scene.main while $scene != nil
 Graphics.transition(30)
#=begin
rescue => error
 a = Dir.getwd
 aw = !FileTest.exists?(a+'/ErrorsLog.txt') ? 'w': 'a'
 log = File.open(a+'/ErrorsLog.txt', aw)
 time = Time.new
 year = time.strftime('%Y')
 month = time.strftime('%b')
 day = time.strftime('%d')
 hour = time.strftime('%H')
 min = time.strftime('%M')
 sec = time.strftime('%S')
 logtime = "#{year} #{month} #{day} #{hour}:#{min}:#{sec}"
 log.puts '---', logtime, 'Error! '+error, '---', error.backtrace.join("\n")
 log.close
#=end
rescue Errno::ENOENT
 filename = $!.message.sub("No such file or directory - ", "")
 print "Unable to find file #{filename}."
end
begin
 Graphics.freeze
 $scene = Scene_Title.new
 $scene.main while $scene != nil
 Graphics.transition(30)
rescue Exception => error
 KyoLog.write(error)
rescue Errno::ENOENT
 filename = $!.message.sub("No such file or directory - ", "")
 print "Unable to find file #{filename}."
end
class Game_Event; attr_reader :map_id; end
module KyoLog
CodeList = {
101 => 'Show Text', 102 => 'Show Choices',
402 => 'When [**]', 403 => 'When Cancel',
103 => 'Input Number', 104 => 'Xhange Text Options',
105 => 'Button Input Processing', 106 => 'Wait',
111 => 'Conditional Branch', 411 => 'Else',
112 => 'Loop', 413 => 'Repeat Above',
113 => 'Break Loop', 115 => 'Exit Event Processing',
116 => 'Erase Event', 117 => 'Call Common Event',
118 => 'Label', 119 => 'Jump to Label',
121 => 'Control Switches', 122 => 'Control Variables',
123 => 'Control Self Switch', 124 => 'Control Timer',
125 => 'Change Gold', 126 => 'Change Items',
127 => 'Change Weapons', 128 => 'Change Armor',
129 => 'Change Party Member', 131 => 'Change Windowskin',
132 => 'Change Battle BGM', 133 => 'Change Battle End ME',
134 => 'Change Save Access', 135 => 'Change Menu Access',
136 => 'Change Encounter', 201 => 'Transfer Player',
202 => 'Set Event Location', 203 => 'Scroll Map',
204 => 'Change Map Settings', 205 => 'Change Fog Color Tone',
206 => 'Change Fog Opacity', 207 => 'Show Animation',
208 => 'Change Transparent Flag', 209 => 'Set Move Route',
210 => "Wait for Move's Completion", 221 => 'Prepare for Transition',
222 => 'Execute Transition', 223 => 'Change Screen Color Tone',
224 => 'Screen Flash', 225 => 'Screen Shake',
231 => 'Show Picture', 232 => 'Move Picture',
233 => 'Rotate Picture', 234 => 'Change Picture Color Tone',
235 => 'Erase Picture', 236 => 'Set Weather Effects',
241 => 'Play BGM', 242 => 'Fade Out BGM0',
245 => 'Play BGS', 246 => 'Fade Out BGS',
247 => 'Memorize BGM/BGS', 248 => 'Restore BGM/BGS',
249 => 'Play ME', 250 => 'Play SE',
251 => 'Stop SE', 301 => 'Battle Processing',
601 => 'If Win', 602 => 'If Escape',
603 => 'If Lose', 302 => 'Shop Processing',
303 => 'Name Input Processing', 311 => 'Change HP',
312 => 'Change SP', 313 => 'Change State',
314 => 'Recover All', 315 => 'Change EXP',
316 => 'Change Level', 317 => 'Change Parameters',
318 => 'Change Skills', 319 => 'Change Equipment',
320 => 'Change Actor Name', 321 => 'Change Actor Class',
322 => 'Change Actor Graphic', 331 => 'Change Enemy HP',
332 => 'Change Enemy SP', 333 => 'Change Enemy State',
334 => 'Enemy Recover All', 335 => 'Enemy Appearance',
336 => 'Enemy Transform', 337 => 'Show Battle Animation',
338 => 'Deal Damage', 339 => 'Force Action',
340 => 'Abort Battle', 351 => 'Call Menu Screen',
352 => 'Call Save Screen', 353 => 'Game Over',
354 => 'Return to Title Screen', 355 => 'Script',
404 => 'Branch End - Choices', 604 => 'Branch End Battle Processing',
401 => ' Text Line', 0 => '',
}
D, Line = Dir.getwd, '-----'
@aw = !FileTest.exists?(D+'/ErrorsLog.txt') ? 'w': 'a'
@e = []
time = Time.new
year = time.strftime('%Y')
month = time.strftime('%b')
day = time.strftime('%d')
hour = time.strftime('%H')
min = time.strftime('%M')
sec = time.strftime('%S')
@logtime = "#{year} #{month} #{day} #{hour}:#{min}:#{sec}"
def self.write(error, type='An error occurred!')
log = File.open(D+'/ErrorsLog.txt', @aw)
log.puts Line, @logtime, type, error
log.puts error.backtrace.join("\n"), Line
log.close
end
def self.write_events_info
e = File.open(D+'/Events.txt', @aw)
gp, gm = $game_player, $game_map.events
x, y = $data_system.start_x, $data_system.start_y
e.puts Line, @logtime
e.puts "Player's Starting Position - X: #{x}, Y: #{y}"
e.puts "Player's Current Position - X: #{gp.x}, Y: #{gp.y}"
e.puts 'Map Events Keys Size = ' + gm.keys.size.to_s
for n in 1..gm.size
@e.push "Map #{gm[n].map_id}, ID: #{gm[n].id},"+
"X: #{gm[n].x}, Y: #{gm[n].y}, Value: #{gm[n]}, "+
"Trigger: #{gm[n].trigger}\n\n Commands List:\n"
for m in 0...gm[n].list.size
c = gm[n].list[m].code; l = CodeList[c]
com = c != 0 ? 'command_' : ' '
command = c != 0 ? " #{com}#{c} - #{l}" : ''
@e.push command
end
end
e.puts "\n", @e.join("\n"), Line, Line
e.close
@e.clear
end
end
---
2009 Apr 10 18:29:40
Error! undefined method `z=' for nil:NilClass
---
Section089:383:in `main'
Section093:10
---
2009 Apr 10 18:33:52
Error! undefined method `[]' for nil:NilClass
---
Section089:225:in `refresh'
Section089:239:in `update'
Section089:431:in `update'
Section089:403:in `processing'
Section089:400:in `loop'
Section089:405:in `processing'
Section089:394:in `main'
Section093:10
module KyoBackup
 time  = Time.new
 year  = time.strftime('%Y')
 month = time.strftime('%m')
 day  = time.strftime('%d')
 hour  = time.strftime('%H')
 min  = time.strftime('%M')
 sec  = time.strftime('%S')
 @logtime = "#{year}#{month}#{day} #{hour}#{min}#{sec}"
 Backup = 'Backup'
 BUT = " #{@logtime}"
 BN  = File.basename(Dir.getwd)
 DN  = File.dirname(Dir.getwd)
 S  = '/'
 DEST = DN+S+Backup+S+BN+' '+BUT
Â
 def self.project
  FileUtils.mkdir(DN+S+Backup) if !File.exists?(DN+S+Backup)
  FileUtils.cp_r(Dir.getwd, DEST)
  print 'Backup ended successfully!'
 end
end
class Window_Input < Window_Message
Â
 def initialize(text, digits)
  super()
  @var_id = 1
  start_input(text, digits)
 end
Â
 def start_input(text, digits)
  @old_data = $game_variables[@var_id]
  $game_variables[@var_id] = 0
  $game_temp.message_text = text
  $game_temp.num_input_variable_id = @var_id
  $game_temp.num_input_digits_max = digits
  $game_temp.num_input_start = 1  # from_line
 end
Â
 def finished?
  return @input_number_window.nil?
 end
Â
 def get
  loop do
   # Update game screen
   Graphics.update
   # Update input information
   Input.update
   # Frame update
   update
   # Abort loop if screen is changed
   if @input_number_window.nil?
    break
   end
  end
  number = $game_variables[@var_id]
  $game_variables[@var_id] = @old_data
  return number
 end
Â
end
#===============================================================================
# ** Graphics : Change Frame Rate
#===============================================================================
class << Graphics
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :chngframerate_graphics_update, :update
#-----------------------------------------------------------------------------
# * Update
#-----------------------------------------------------------------------------
def update
chngframerate_graphics_update
if Input.press?(Input::CTRL)
if Input.trigger?(Input::F5)
Graphics.frame_rate -= 10
return
elsif Input.trigger?(Input::F6)
Graphics.frame_rate += 10
return
elsif Input.trigger?(Input::F7)
Graphics.frame_rate = 40
return
end
end
end
end