Hello, I am trying to update the game saving so that when save is selected:
1) the menu closes
2) text appears asking "are you sure?" with choices "yes" or "no"
3) if player chooses yes, the game saves to the first file
What I've done is add a new command called save2 that lookos like this:
using this i get an error saying:
"undefined method 'setup_choices' for Scene_Menu"
if i replace setup_choices with the code that i want to be called, something like this:
my choices actually appear, but when i choose one, i get an error saying:
"undefined method '[]=' for nil:NilClass"
I think this is the wrong way to go about it though, and that my issues stem from not being able to call setup_choices properly. Any help would be greatly appreciated 🙂
1) the menu closes
2) text appears asking "are you sure?" with choices "yes" or "no"
3) if player chooses yes, the game saves to the first file
What I've done is add a new command called save2 that lookos like this:
def command_save2
return_scene
$game_message.add("Are you sure you want to save?")
params = []
choices = []
choices.push("Yes")
choices.push("No")
params.push(choices)
params.push(1)
setup_choices(params)
end
using this i get an error saying:
"undefined method 'setup_choices' for Scene_Menu"
if i replace setup_choices with the code that i want to be called, something like this:
def command_save2
return_scene
$game_message.add("Are you sure you want to save?")
params = []
choices = []
choices.push("Yes")
choices.push("No")
params.push(choices)
params.push(1)
params[0].each {|s| $game_message.choices.push(s) }
$game_message.choice_cancel_type = params[1]
$game_message.choice_proc = Proc.new {|n| @branch[@indent] = n }
end
my choices actually appear, but when i choose one, i get an error saying:
"undefined method '[]=' for nil:NilClass"
I think this is the wrong way to go about it though, and that my issues stem from not being able to call setup_choices properly. Any help would be greatly appreciated 🙂