someperson
Member
Ok, a script I got here works fine when I test my game in test play. Now I exported a demo version encrypting the game data and if I run the game, I get an error about nil not being able to convert to a string and the error is in this script.
Please help, greatly apreciate.
Code:
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing. Created by Khmp
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Constant Variables
#--------------------------------------------------------------------------
Swap_Frames = 2.5
# Don't mess with the one below this line.
Titles = Dir["Graphics/Titles/*.{png,bmp,jpg,jpeg}"]
Titles.each_index { |i| Titles[i] = Titles[i].split('/').last }.sort!
#--------------------------------------------------------------------------
# * Alias Methods
#--------------------------------------------------------------------------
alias sope_animatedtitle_scene_title_update update
#--------------------------------------------------------------------------
# * Frame Update !ALIAS!
#--------------------------------------------------------------------------
def update
# Declare the timer if it doesn't exist.
@timer = Swap_Frames if @timer.nil?
@title_index = 0 if @title_index.nil?
# Reset the background and the timer when it reaches 0
if @timer <= 0
@title_index += 1
@title_index = 0 if @title_index == Titles.size
@timer = Swap_Frames
@sprite.bitmap = RPG::Cache.title(Titles[@title_index])
end
@timer -= 1
sope_animatedtitle_scene_title_update
end
end
Please help, greatly apreciate.