ID:176790
 
How do you do a Pwipe for your game? I really need to know how, because there was a bug in my game, letting everyone have GM powers and letting them edit themselves.
You delete the save files.
In response to Garthor
Yeah, I figured that, but how do you do that? Where in the coding of a game do you do that?
In response to Kamion
mob
Login()
fdel("*world.dme file here*")

Actually, no. I'd take a lot of flak for that.... Just delete the files manually. They should be where you put them.
In response to Garthor
Ok, I'm gonna try to explain my whole system, so you can help me a little bit better. My game can be run by anyone, not just me, so what should I add or change in my code to delete all the savefiles for my world from all the computers of those that have run my game so far?
In response to Kamion
I dont think thats possible. Youd have to put something in that checks when a savefile is loaded if it has a variable saved to it or not. That variable is the version number. If its null, or bellow the current versions number, then it deletes the file.
-DogMan
If the files are stored on the host server, and you're the only one who hosts the game, then you can just go into your file directory, find them, and delete them manually...

If there are other hosts (I.E. the game is up for public use) then slap a bit right after the line that read()s the savefile that deletes the savefile... However, this alone will end up deleting them everytime, instead of just once... So, you'll need to put in some checks to limit it to just once...

For DBTC, all savefiles are stored client-side... So I have no way of manually deleting them...

What I do is have a check in my Login code right after the file is read that checks to see if a variable is set to a certain number... If it is below that number, then I send their info to a proc that resets all stats back to starting values, and saves over the old file...upping the check variable so that they will pass on the next try... I then just call their Login() again...

There are many ways of doing this, and all depend on the saving system you are using...
In response to Dog Man
Or you could hardcode GM status into the game.
In response to OneFishDown
Yeah, but that wouldnt get rid of the files (Or the bonuses given by the 'fake GMs').
-DogMan
In response to Dog Man
Oh yea, for that you check to see if their stats are way too high to be normal (they were edited) and you hire a hitman to take care of all the cheaters.