ID:145071
 
Code:
        if(q=="Delete Game")
if(fexists("players/[src.ckey].sav"))
var/decide=input("Are you sure you wish to delete your saved game?") in list ("Yes","No")
switch(decide)
if("Yes")
src<<"Deleting File..."
var/savefile/F=new("players/[src.ckey].sav")
del (F)
sleep(20)
src<<"File Deleted!"
goto Load
if("No")
goto Load
else
src<<"There is no save file to delete!"
goto Load


Problem description:

it goes throught the steps fine, except it doesn't delete the old savefile. Plz help
use fdel() not del (F) look it up in the reference..
In response to A.T.H.K
A.T.H.K wrote:
use fdel() not del (F) look it up in the reference..

ok i did that and when i did
fdel(F)
this error showed up:
<font color=red>
runtime error: bad file
proc name: Login (/mob/player/Login)
source file: Login&Logout.dm,115
usr: FriesOfDoom (/mob/player)
src: FriesOfDoom (/mob/player)
call stack:
FriesOfDoom (/mob/player): Login()
FriesOfDoom (/mob/player): Login()
</font>

and when i just did
fdel()

this error showed up:
<font color=red>
Login&Logout.dm:115:error:fdel :expected 1 argument (found 0).
Login&Logout.dm:114:F :warning: variable defined but not used
</font>
In response to FriesOfDoom
nvm fixed it
In response to FriesOfDoom
fdel("players/[src.ckey].sav") ..... if you have read the reference like is aid you would know that...