ID:141031
 
Code:
mob
proc
LoadPlayer()
if(fexists("[src.key].sav"))
var/savefile/F = client.Import("[src.key].sav")
Read(F)
for(var/stuff in src.V)
src.verbs += stuff
world<<"Info <b><font color=silver>:[usr] <font color=green>(Key: [src.key]) has logged in..."
src.loc = locate(xco,yco,zco)
client.view=6
src.OOC = 1
src.cansave=1
src.Frozen = 0
src.AutoSave()
src.logincrap()</b>

mob
verb
Savenow()
set name ="Save"
if(usr.cansave)
var/savefile/F = new("[usr.key].sav")
usr.V = usr.verbs
usr.xco = usr.x
usr.yco = usr.y
usr.zco = usr.z
Write(F)
client.Export(F)
spawn(10) usr << "<b><font color=Green>Server Info: <font color=blue><b>Your game has been saved!"


mob
Login()
//Closed_Testing()
var/savefile/F = client.Import("[src.key].save")
if(F) Read(F)
world<<"<font color=white><b>>Announcement<</b><font color=red> [usr.key] Has Logged Onto The Server."
src.loc = locate(7,6,50)
src<<'rocks.mid'
src.client.command_prompt="Stat Bar---Level: ([usr.level]) Health: ([usr.health]) / ([usr.maxhealth]) Chakra: ([usr.chakra]) / ([usr.Mchakra])..."
src<<"<font color=#FFADCC><font size=1>byond://[world.address]:[world.port] (World Address)"
src<<"<a href=http://www.narutodevastation.forumotion.com><font color=blue>Join the forum</a>"


Problem description:Save in key directory>

First code is load code 2nd is save and 3rd is loging


Ok the first thing is it seems like the save code works but when I restart the game it doesnt want to load it so anyone could post me the fixed code plz cause idk how to fix it I am still at learning thx for any help :)
You're not calling the mother AT ALL with your Login(), so I'm kinda surprised new mobs can even enter your game.
In response to Demon_F0rce
Like I said I am still learning and in theory so explanation I am pretty bad I learn from practical things so could you post me a fixed code so I can see whats the prob :)?
In response to Kisuo
"I learn from practical things"

So many people say this, yet don't realise that there are so many resources that tend to this. I was in the same boat as you when I started programming - what you do is search for Dream Makers posts, and look at the DM guide - you may not realise it, but both handle things practically.
In response to Demon_F0rce
Ok but how do I fix this code I need to fix it cause I cant find a full 24/7 host neither I cant find a host that hosts atleast some days at a good time.
Thats why I need to make that code so anyone can join diff servers with same savefile so plz help meh
In response to Kisuo
"Calling the mother" is one of the first things introduced in the DM Guide, and Read() and Write() procs are also introduced in the end. Code Problems and Develepor How-To are places to go to seek assistance when your out of problems, not to demand for pieces of code when you don't feel like looking around.
In response to Kisuo
Well I got it fixed
Thx for any help this topic is now closed lol
In response to Demon_F0rce
Essentially all Login() does by default is* place the mob on a valid map location [if there is one] if it's not already on one. So if your Login() override places the mob on the map already, you don't have to call ..(), though it can still be a good idea anyway, of course.
Also, you're the first one I've seen referring to it as "calling the mother". =P It's usually called "calling the parent [function]".

*: It's supposed to also set statobj, but IIRC, it's still set even if you do skip the default Login().
In response to Kaioken
Really? I read the DM Guide about a year or two ago and remember it as "calling the mother".
In response to Demon_F0rce
Either horrible programmer humor or a "your mother" joke.

Possibly both.
In response to Garthor
Maybe what you said or maybe it was once referred to like that as an early explanation. With a quick search I couldn't find it mentioned though, so maybe he only thought it was, or something. >_>

EDIT: @[link]: Yep, thought so. =P
In response to Kaioken
Kaioken wrote:
so maybe he only thought it was

This.