ID:146526
 
Code:
mob
Login()
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("Players Save/[firstletter]/[src.ckey].sav")
if(fexists(F))
Read(F)
else
var/name = input("Name","")as text
src.loc = locate(1,1,1)
src.name = name
src.icon = 'James Bond.dmi'
src.Name(src.name)
world << "<b>[src] has joined the server"
Make_NPC()


Problem description:
I can't figure out what's wrong..


~C

fexists() takes a text string as an argument, not a file. Change the "F" that you're passing to the full path to the file. You should also be defining the savefile variable after you check to see if it exists, since no matter what you'd be creating it if it didn't exist before you checked to see if it did or not.