The following script is part of Skills Learning System (SLS 2.0)* by Charlie Lee. It fails on line 16** as long as SDK(2.3) is in the game scripts. Can anyone explain why this happens and how to fix it? Thanks in advance.
* - http://rmvxpuniverse.com/f23/t24
** - When trying to activate the equip screen
#==============================================================================
# ** Skills Learning System (SLS) by Charlie Lee
#
# Version: 2.0
# Author: Charlie Lee
#==============================================================================
class Scene_Equip
alias sls_main main
def main
@equipment_skill_window=Window_Equipment_Skill.new
@equipment_skill_window.actor=$game_party.actors[@actor_index]
@equipment_skill_window_visible=$game_temp.equip_equipment_skill_window_visible
@equipment_skill_window.set_x(336)
@equipment_skill_window.set_y(128)
# Original call
sls_main
@equipment_skill_window.dispose
end
alias sls_update update
def update
if Input.trigger?(Input::A)
$game_temp.equip_equipment_skill_window_visible=!$game_temp.equip_equipment_skill_window_visible
end
if @item_window1.active
@equipment_skill_window.target_x=((@item_window1.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(0,@item_window1.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window2.active
@equipment_skill_window.target_x=((@item_window2.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(1,@item_window2.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window3.active
@equipment_skill_window.target_x=((@item_window3.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(2,@item_window3.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window4.active
@equipment_skill_window.target_x=((@item_window4.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(3,@item_window4.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window5.active
@equipment_skill_window.target_x=((@item_window5.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(4,@item_window5.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @right_window.active
@equipment_skill_window.target_x=320+16
@equipment_skill_window.target_y=128+32*@right_window.index
@equipment_skill_window.update(@right_window.index,@right_window.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
else
@equipment_skill_window.visible=false
end
# Original call
sls_update
end
end
class Game_Temp
attr_accessor :equip_equipment_skill_window_visible
alias equip_add_on_initialize initialize
def initialize
@equip_equipment_skill_window_visible=true
equip_add_on_initialize
end
end
* - http://rmvxpuniverse.com/f23/t24
** - When trying to activate the equip screen
#==============================================================================
# ** Skills Learning System (SLS) by Charlie Lee
#
# Version: 2.0
# Author: Charlie Lee
#==============================================================================
class Scene_Equip
alias sls_main main
def main
@equipment_skill_window=Window_Equipment_Skill.new
@equipment_skill_window.actor=$game_party.actors[@actor_index]
@equipment_skill_window_visible=$game_temp.equip_equipment_skill_window_visible
@equipment_skill_window.set_x(336)
@equipment_skill_window.set_y(128)
# Original call
sls_main
@equipment_skill_window.dispose
end
alias sls_update update
def update
if Input.trigger?(Input::A)
$game_temp.equip_equipment_skill_window_visible=!$game_temp.equip_equipment_skill_window_visible
end
if @item_window1.active
@equipment_skill_window.target_x=((@item_window1.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(0,@item_window1.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window2.active
@equipment_skill_window.target_x=((@item_window2.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(1,@item_window2.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window3.active
@equipment_skill_window.target_x=((@item_window3.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(2,@item_window3.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window4.active
@equipment_skill_window.target_x=((@item_window4.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(3,@item_window4.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @item_window5.active
@equipment_skill_window.target_x=((@item_window5.index+1)%2)*320+16
@equipment_skill_window.target_y=272
@equipment_skill_window.update(4,@item_window5.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
elsif @right_window.active
@equipment_skill_window.target_x=320+16
@equipment_skill_window.target_y=128+32*@right_window.index
@equipment_skill_window.update(@right_window.index,@right_window.item.id)
@equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
else
@equipment_skill_window.visible=false
end
# Original call
sls_update
end
end
class Game_Temp
attr_accessor :equip_equipment_skill_window_visible
alias equip_add_on_initialize initialize
def initialize
@equip_equipment_skill_window_visible=true
equip_add_on_initialize
end
end