The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Emerald on June 07, 2010, 06:19:39 PM

Title: Deleting save files
Post by: Emerald on June 07, 2010, 06:19:39 PM
Hi,

I've just recently started learning RGSS. Most of the time I do this by ripping up the scripts already given and modifying them, just to see what happens and get a better understanding of the functions (I'm a really slow learner when it comes to reading countless information on sites and helpfiles. I learn best by just trying). I've spent a decent amount of hours modifying the menuscreen and the titlescreen, but in my recent idea for an add on I've found myself stuck with an issue. I've been trying to create a function to delete the save files while in the game, but somehow I don't seem to manage. Does anyone have any clues on how to get this done?

I've added the option in the titlescreen menu to open a window for save game deletion and I've created the window where all savegames are given. I've also redirected it back to itself (when you pick a savegame it reopens the window) and I actually hoped I would get it to work to erase the savegame in that process, but all I've tried fails.

thanks in advance, Emerald
Title: Re: Deleting save files
Post by: cozziekuns on June 07, 2010, 06:46:15 PM
Have you tried using the File.delete command? That's probably your best bet.

You could probably figure the rest out yourself.
Title: Re: Deleting save files
Post by: Emerald on June 08, 2010, 06:55:44 PM
perfect!

I hadn't tried that, but yes I figured it out now.

Thank you for your answer