ID:146264
 
Well I've made a couple of topics now about save problems, but I think the huge file scared them away so I've chopped the file down to what needs to be in it to save.

Now I didn't see this before but it IS SAVING. It just wont load the save files. I think its something wrong with the login please check.

world
name = ("Dragonball Blitz Revamped") //client title appears as Dragonball Blitz Revamped
view = 6 //player sees 6x6 screen
hub = "CYN.DragonballBlitzRevamped " //appears under my name when hosted on the hub

client
script = "<STYLE>BODY {background: black; color: white}</STYLE>" //background color black, text white

world
mob=/mob/choosing/ChooseCharacter //usr enters world and generates ChooseCharacter

mob/create_character
var/mob/character
Login() //user logs in and is asked for a character name and a race to select
var/charactername = input("Character Name:","Name",src.key)
switch(input("What race do you wish to be?","Race?") in list("Saiyan","Human"))
if ("Saiyan")
character = new /mob/characters/Saiyan()
if ("Human")
character = new /mob/characters/Human()
character.name = charactername
src.client.mob = character
usr.loc=locate(40,40,1)
del(src)
..()

mob/characters/Saiyan
icon = 'SaiyanBase.dmi'
icon_state = "Norm"

mob/characters/Human
icon = 'SaiyanBase.dmi'
icon_state = "Norm"

mob/Logout()
del(src)

client/proc/SaveMob()
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
var/char_ckey = cKey(src.mob.name)
F["/[ckey]/[char_ckey]"]<<src.mob

client/proc/LoadMob(char_ckey)
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
F["/[ckey]/[char_ckey]"]>>src.mob

client/Del()
if (istype(src.mob, /mob/create_character))
return ..()

SaveMob()
return ..()

mob
Login()
..()
if (!istype(src, /mob/create_character))
sample_report()
world << "<B><font color = yellow>Event:</font><font color = green> [src] has logged in!"
if(src.PL > src.MaxPL)
src.PL = src.MaxPL

Write(savefile/F)
..()

F["last_x"] << x
F["last_y"] << y
F["last_z"] << z

Read(savefile/F)
..()

var/last_x
var/last_y
var/last_z
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)
proc
sample_report()
src << browse("<font face=Courier><Center><STYLE>BODY {background: black; color: yellow}</STYLE><B>Welcome to Dragonball Blitz Revamped!</b><HR>CYN")

client
verb
Save()
set category = "Communication"
SaveMob()
usr << "Saving Character..."
sleep(20)
usr << "...Save Complete"

mob/proc/ChooseCharacter()
var/list/characters = src.CharacterList()
var/newCharacterChoice = "New Character"
var/DeleteCharacterChoice = "Delete Character"
var/list/menu = new()
menu += characters
menu += newCharacterChoice
menu += DeleteCharacterChoice
var/result = input("Character Creation", "Dragonball Blitz Revamped") in menu
if (result == newCharacterChoice)
src.CreateNewCharacter()

mob/proc/CharacterList()
var/firstletter=copytext(src.ckey, 1, 2)
var/savefile/F = new("players/[firstletter]/[src.ckey].sav")
F.cd = "/[ckey]"
var/list/characters = F.dir
return characters



What error is DreamSeeker printing out when you try to load your character?
In response to Sinyc
Dream MAKER says login.dm:10:error:/mob/choosing/ChooseCharacter:undefined type path
login.dm:105:error:src.CreateNewCharacter:undefined proc
In response to CYN
Dont Rip Zeta and make ur own,, problem solved, Zeta is buggy, laggy and crappy
In response to Xeronage
i didnt

but i think i need something like this
mob/choosing/ChooseCharacter
var/input(("What would you like to do?","Menu") in list("Load","New"))
In response to CYN
Yes you did, the code is an exact copy of Zeta, well, near-exact with ur edits
In response to Xeronage
I had Arsy send me his save code so if it is zeta then it's his fault.
In response to CYN
ur Choosecharacter() is zeta too..