ID:170944
 
okay ive been looking for the past hour for a "GOOD DEMO" on a a saving system to go with this login
mob
Login()
ppl+=1
if(usr.key == "Smokymcpot")
client.view = 9
switch(input("What would you like to do?","Logging In") in list ("New Character","Resume","Delete","Quit"))
if("Quit")
del(src)
ppl-=1
if("Delete")
alert("Coming Soon Sorry For The Inconvinece Ask if you need to delete a char")
if("Resume")
if("New Character")
usr.name = input("what would you like your name to be?")
switch(input("Who would you like to be?") in list("Magneto","Ice Man","Wolverine","Rouge","Cyclopes","Storm","Night Crawler"))
if("Magneto")
usr.icon= new/mob/characters/Magneto
if("Ice Man")
usr.icon= new/mob/characters/Iceman
if("Wolverine")
usr.icon = new/mob/characters/Wolverine
if("Rouge")
usr.icon=new/mob/characters/Rouge
if("Cyclopes")
usr.icon=new/mob/characters/Cyclopse
if("Storm")
usr.icon = new/mob/characters/Storm
if("Night Crawler")
usr.icon = new/mob/characters/Night_Crawler
usr.loc = locate(50,50,1)
world<<"<font color = aqua> [usr] / [usr.key] has logged in!"
Logout()
ppl-=1
world<<"<B>[usr]</B> has logged out"


if some can plz help me intergrate a good save system that will allow to resume and delete i would very much so like it




Deadron has a good character handling lib you should try. You'll need to use wizkidd's fix though. You may also have to edit it a little to get it to work how to want it, but it's pretty easy, just change do the Login() proc for your Player mob, and then have deadron's switch to that mob and you can do it all :P
In response to Lenox
okay maybe i should of metioned that the only way im wanting to save is by save point
but i will look over that lib
In response to Gouent
It's better to go with a custom save system then, they aren't hard to make. You seem to be talking about something like the Final Fantasy version of char saving :P
In response to Lenox
well see every time i make my own save system it never loads up back when i get everything up but yea its goign to be more like an ffa game becasue i dont wont people to log out in the middle of a room full of monsters lol could you help me with the custom one or point in a good direction?
In response to Gouent
First, start out with char saving/loading, then, move onto making the savepoints if you haven't already, and make them call the save proc when you click on them, then, go on to choosing character, then creating.
In response to Lenox
okay im going to attempt to try to make my own thanks for being paticent with me and ill ask again if i need help
In response to Gouent
Np, good luck with that m8.
In response to Lenox
mob
proc
save()
var/savefile/F
F[usr.x] = lx

Login.dm:41:F :warning: list doubly initialized
just starting off on the coding wtf does that mean lol
already have lx defined
In response to Gouent
Gouent wrote:
mob
> proc
> save()
> var/savefile/F
> F[usr.x] = lx

Login.dm:41:F :warning: list doubly initialized
just starting off on the coding wtf does that mean lol
already have lx defined
try...
mob
proc
Save()
var/savefile/F = new("Characters/[src.name]/")
F["X"] << src.x
F["Y"] << src.y
F["Z"] << src.z
F["Mob"] << src.client.mob

That SHOULD work.
In response to Lenox
<font color = red>BYOND Error:(Sfile.cpp,1139) failed to open file:
BYOND Error:(Sfile.cpp,1139) Characters\ff\
proc name: save (/mob/proc/save)
source file: Login.dm,42
usr: the ff (/mob)
src: the ff (/mob)
call stack:
the ff (/mob): save()
the ff (/mob): Save()
BYOND Error:(Sfile.cpp,1139) failed to open file:
BYOND Error:(Sfile.cpp,1139) Characters\ff\
proc name: save (/mob/proc/save)
source file: Login.dm,42
usr: the ff (/mob)
src: the ff (/mob)
call stack:
the ff (/mob): save()
the ff (/mob): Save()
Reconnecting...
BYOND Error:(Sfile.cpp,1139) failed to open file:
BYOND Error:(Sfile.cpp,1139) Characters\Smokymcpot\
proc name: load (/mob/proc/load)
source file: Login.dm,50
usr: Smokymcpot (/mob)
src: Smokymcpot (/mob)
call stack:
Smokymcpot (/mob): load()
Smokymcpot (/mob): Login()



thats the errors i get using this


mob
proc
save()
var/savefile/F = new("Characters/[src.name]/")
F["X"] << src.x
F["Y"] << src.y
F["Z"] << src.z
F["Mob"] << src.client.mob
usr<<"<font color = aqua>you saved"
proc
load()
var/savefile/F = new("Characters/[src.name]/")
F["src.x"] >> X
F["src.y"] >> Y
F["src.z"] >> Z
F["Mob"] >> src.client.mob

var
X
Y
Z

In response to Gouent
Your loading non-existant files, which is why your getting runtimes, make a new char proc real fast :P
In response to Lenox
its not working because thats just a directory, try having F equal to the actualy save file
var/savefile/F=new("characters/[ckey].sav")