So here's the mistake.
1. the backtrace needs to be at the bottom.
2. the main needs to be commented out or removed.
1. the backtrace needs to be at the bottom.
2. the main needs to be commented out or removed.
Why does main need to be commented out or removed? That is a default script.
Because Backtrace changes how the main call works.
Based on that I would change the script to this.
class Window_ItemList < Window_Selectable
def make_item_list
@data = $game_party.all_items.select {|item| include?(item) }
@data.sort! { |a, b| a.name <=> b.name }
@data.push(nil) if include?(nil)
end
end
class Window_SkillList < Window_Selectable
def make_item_list
@data = @actor ? @actor.skills.select {|skill| include?(skill) } : []
@data.sort! { |a, b| a.name <=> b.name }
@data.push(nil) if include?(nil)
end
end
Nil was added to the data before it was sorted.
Ah, cheers for fixing that bud. I never thought about the nil element.
Original thread: https://forums.rpgmakerweb.com/threads/sort-items-skills-script.159373/