Script Call to Delete current save file.

Hey there peeps. Just a quick question. (Wasn't sure if this was RGSS3 support or not.) But I just need to know what the Script Call would be to delete the current save file on the file you are playing on? I don't want to delete all the saved files just the one you are on when playing.

(Plot related and stuff, and you are given a warning beforehand too, so it isn't to say that you don't see it coming.) 😛
DataManager.delete_save_file(last_savefile_index)
This will remove the save file that was created last, so should be the file they are using.
Gave me an error:

Game_Interpreter' line 1411: NameError occurred.

undefinited local variable or method last_savefile_index for #<Game_Interpreter:0x10bb8c0c>
Gave me an error:

Game_Interpreter' line 1411: NameError occurred.

undefinited local variable or method last_savefile_index for #<Game_Interpreter:0x10bb8c0c>
DataManager.delete_save_file(DataManager.last_savefile_index)
I found what I needed. To answer, the script call will be this:

index = DataManager.last_savefile_index
DataManager.delete_save_file(index)

Original thread: https://forums.rpgmakerweb.com/threads/script-call-to-delete-current-save-file.134163/