That script seems to be fine for me. Do you mind to explain why it isn't working for you?
EDIT:I am sure you are not using it in the right way. Create a new script over Main (press F11 first to open the window... At least i think it was F11, not sure)
Copy and paste this into the new blank script:
class Scene_Save
def self.save(file_index)
save_obj = self.new
file = File.open(save_obj.make_filename(file_index), "wb")
save_obj.write_save_data(file)
file.close
end
end
And then, in wichever event you need the script to autosave your file, use a Script Call command with the following syntax:
Instead of the "
slot" word, use an integer value (
number) such as 1,2,3, etc. Where that value is the slot you want the game to be saved into.
For example, if you want to replace the saved slot number 0 (the first one, counting from the top) just before the boss fight; place a Call Script command right before the Battle Processing line with the following text:
Simple as that. Let me know if it is still not working.