ID:155579
 
Well, my code has been acting stupid and I can't seem to find anyway to have it work.. Help out, please:

This is part of my Login code. The rest has nothing to do with Login, load, etc.
mob/Login()
if(verified)
src.client.control_freak=0
src.ToggleChat()
players+=src
src << "Logging in and checking verification.."
src << "Server verified."
src << "Server Link: byond://[world.address]:[world.port]"
world << "[src.key] has logged on."
src.icon='pregnant_woman.dmi'
src.icon_state=""
if(fexists("Save Files/[src.key].sav"))
src.Logginer()
else
src.AdminGive()
src.loc=locate(250,250,1)


If the person has a file then it loads logginer where they have the choice to Load or Delete:
    Logginer()
if(fexists("Save Files/[src.key].sav"))
switch(input("You have a save file. What do you wish to do?","Save File") in list ("Load","Delete"))
if("Load")
src.Load()
if("Delete")
switch(input("Are you sure about deleting your file?","Check") in list ("Yes","No"))
if("Yes")
var/savefile/F=("Save Files/[src.key].sav")
del(savefile/F)
src.Login()
if("No")
src.Logginer()


This is my load and save code.
    Load()
var/savefile/F=file("Save Files/[src.key].sav")
F["V"] << src.verbs
F["xco"] << src.x
F["yco"] << src.y
F["zco"] << src.z
usr.client.Export(F)

Save()
var/savefile/F= new("Save Files/[src.key].sav")
F["V"] >> src.verbs
F["xco"] >> src.x
F["yco"] >> src.y
F["zco"] >> src.z
usr.client.Import(F)
src<<"Saved."


Now, I already know I can make these codes shorter. I just added on F[""] because it was not working.. so.. eventually it became longer. I have a code that works but you cannot delete. You can only overwrite. I'd appreciate it if somebody helped out. My code seems to be acting really... stupid.
It looks to me like your mixing client side saving, and server side saving. Which are you trying to do ?
In response to Pirion (#1)
Not mixing. Only trying to find a solution(in any sort of way) to fix my runtime errors. I am only trying to save a players vars and verbs and xyz coords. But it leaves the player file's size to 0KB and this means the save file is corrupt so the Load() will fail and leading to a Logginer() Error which will continuously repeat itself if the error starts because Loginner is a loop proc that will loop if you click Delete -> Yes. Which leads to my other problem.. del(F) does not work. It says "bad del" if I can recall from my past memory.
In response to Xirre (#2)
Saving to the server example:
client/verb/Load()
if(fexists("Save Files/[src.key].sav"))
var/savefile/F=file("Save Files/[src.key].sav")
var/mob/m
F >> m
src.mob = m
else
src << "No Saves"

client/verb/Save()
var/savefile/F= new("Save Files/[src.key].sav")
F << src.mob
src<<"Saved."


To add extra lines when saving:

mob/Read(savefile/F)//add extra loading into read.
..() //default behavior
F["x"] >> src.x
F["y"] >> src.y
F["z"] >> src.z
src.loc = locate(src.x,src.y,src.z)

mob/Write(savefile/F)//add extra saving into write.
..() //default behavior
F["x"] << src.x
F["y"] << src.y
F["z"] << src.z


To delete save files:
client/verb/rem_save()
if(fexists("Save Files/[src.key].sav"))
if(fdel("Save Files/[src.key].sav")) //we are working with external files, so want to use fdel instead of del.
src << "Your Save was deleted."
else
src << "Save was not deleted. Maybe file is locked?"
else
src << "No Saves"


If you wish to only delete part of the save file, you will want to navigate though and remove directories.
In response to Pirion (#3)
Alright. I got it. Not exactly with the code you gave me but partially though. I just switched the output and input signs with the load and save verbs. I guess I had them reversed. Thanks though.