RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
save delete VX Ace RESOLVED

0 Members and 1 Guest are viewing this topic.

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
i need either a small script or an eventing process to delete a save file when hackers are cheating.

Basically it's for those little unreachable places we put into the game to see if people are willing to hack to get to it, i need something to delete the save file for after the event has gone through.

If it ends up a small script, could you please use the script call, thx.

(And Yes i did just get ace)

Edit: am i missing required information?




Code: [Select]
Dir.glob("Save*").each do |f|
  File.delete(f)
end
  This works!
« Last Edit: May 12, 2012, 06:26:04 PM by crow5derlock »
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Well I haven't used VXA all that much, but I remember that they had regions set into them and that you can use a parallel process over an entire region.

Basically set your outbound region to something like 6 or 7 ::)
Then use a common event to check if the player is on one of those regions with the event using a script call then returning them to the title screen.

I'm not testing this on my own games.
But this script call is supposed to work.

Code: [Select]
File.delete(Save01)

Obviously modifying that to do something with the appropriate save file.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
Thank you

Edit: I get an error:
« Last Edit: May 12, 2012, 05:30:54 PM by crow5derlock »
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

****
Rep:
Level 69
Omg haha, I'm going to make a door that deletes your save file every time you open it. ;8

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
You better have a troll face after I open that door, otherwise I'll grow to hate your game really quickly ;8
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

****
Rep:
Level 69
I'm just kidding, I wouldn't actually do that. Thinking about it gave me a good laugh though..

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
The call deosnt work, theres an error, it probably needs something
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Thank you

Edit: I get an error:
Put it in quotation marks

Code: [Select]
File.delete("Save01")

See if that helps.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
Rep:
Level 60
Code: [Select]
File.delete(Save01)

Code: [Select]
File.delete("Save01")

That should be the problem. Save01 tries to access a defined constant while "Save01" sends the string to the delete method which should delete the save file from the project's root folder.

EDIT: D&P3 beat me to it. :)

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
Code: [Select]
File.delete(Save01)

Code: [Select]
File.delete("Save01")

That should be the problem. Save01 tries to access a defined constant while "Save01" sends the string to the delete method which should delete the save file from the project's root folder.

EDIT: D&P3 beat me to it. :)


It seems to be looking for a file type
« Last Edit: May 12, 2012, 05:55:54 PM by crow5derlock »
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

***
Rep:
Level 60
It seems to be looking for a file type



Wonder what that could be. ;)

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
the filename is .rvdata2

I'm not sure if it is put inside or outside of the quotation marks.

Code: [Select]
File.delete("Save01.rvdata2")
Code: [Select]
File.delete("Save01".rvdata2)

See if it works.

EDIT: D&P3 beat me to it. :)
Edit: Role-reversal :)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
Rep:
Level 60
It would be inside the quotation marks.

Code: [Select]
File.delete("Save01.rvdata2")

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
the filename is .rvdata2

I'm not sure if it is put inside or outside of the quotation marks.

Code: [Select]
File.delete("Save01.rvdata2")
Code: [Select]
File.delete("Save01".rvdata2)

See if it works.

it works, but the call deletes all 4 save files and i get an error saying "Save02.rvdata2" not found, what would be the correct if then statement for the call

like if "Save02" is present then Delete it

if it helps this is the event:
« Last Edit: May 12, 2012, 06:06:09 PM by crow5derlock »
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

***
Rep:
Level 60
There is plenty of documentation on Ruby and RGSS3, and I do not see how it would hurt to look into it a little bit before asking us to do it for you. Conditional statements are essential in any case, and honestly, the delete method should not delete all of the save files; how are you calling it?

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
It would be inside the quotation marks.

Code: [Select]
File.delete("Save01.rvdata2")
Yeah I thought it was supposed to be inside the " " but I wasn't 100% sure :)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
Rep:
Level 60
Well, you're calling it to delete all of the save files. It makes sense that it's... deleting all of the save files.

How, exactly, are you trying to determine which save file (or files) to delete, anyway?
« Last Edit: May 12, 2012, 06:18:40 PM by Fall From Eden »

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
in the script call: i just repeated the line with different file names.

then i tried this;

Code: [Select]
if File ("Save01.rvdata2")
 File.delete ("Save01.rvdata2")
end
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
crow5derlock - I think you have common sense and should know how to use this without an explanation :)

Code: [Select]
if File::exists?("FILENAME")
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
Rep:
Level 60
Oh, I get it. You want it to delete all of the save files if the player has reached an area they aren't supposed to (meaning, we assume, that they cheated to get there). Well, that's not so hard. There's a better way to delete all of the save files, though.

Code: [Select]
Dir.glob("Save*").each do |f|
  File.delete(f)
end

EDIT: This kind of goes without saying, but you know that doing this can be incredibly dangerous to abuse, right?

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
im just trying to make a cheat proof game
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

***
Rep:
Level 60
im just trying to make a cheat proof game

So what happens if they make copies of their save files outside of the directory structure of your game? Making something cheat-proof is pretty much impossible.

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
at least they'll think twice before going to certain places after that
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
im just trying to make a cheat proof game
That's fine, but make sure you're not deleting anything important. Save files are ok because they are only accessed when you're loading or saving to them.

If you were to tell the compiler to delete your game file, it could become corrupted, and in a worse case scenario even infect your computer.

So just make sure that nothing in the middle of a process is being forcefully deleted and you should be ok.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3