ID:161035
 
I have two problems/questions.

ONE: My Saving/Loading system is coded like this:

mob
proc/Save()
var/savefile/F = new("/Players/[src.ckey].sav")
Write(F)
F["src"] << src


var/X
var/Y
var/Z

proc/Load()
var/savefile/F = new("/Players/[src.ckey].sav")
Read(F)
F["src"] >> src
src.icon = 'Icons1/Base.dmi'
src.loc=locate( X, Y, Z)


The Saving is fine, it writes to the file. But then when I run the game, for some reson it bypasses all of the mob/Login() code and goes straight to the Loading Proc which messes it all up, BUT, it dosen't fully load. It loads the users X, Y, Z, and Hair...that's it...no icons or anything!

P.S.
The Saving and Loading are procs because I'm doing a Click based title screen.

TWO: It will let me do src.Save() but not src.Load(). It get this error: saving.dm:43:error:src.Load:undefined proc

But the Loading proc IS identified, I have it right above it, I spell checked everything, everythings case is right. But I cannot find out why it is doing this!


turf/LoadChar
icon = 'load.bmp'
Click()
src.Load()
world<<"* [usr.ckey] has connected."



Please Help!! Thanks!

-Hi1</<>
1- Post your mob/Login() and Client/New()

2- You're using Load() on a turf using Click() if you use src it will be referring to the turf, since Load() is a proc for mobs it will say undefined proc. Replace it with usr.Load()
In response to Andre-g1
What is Client/New()? How would I add that in?
In response to Hi1
Show me your mob/Login() if you haven't messed with client/New()
In response to Andre-g1
mob/Login()
src << {"

[CENTER][BIG]Welcome to [world.name]![/BIG][/CENTER]

Hello [usr.key]! This game is 100% original!![font color="red"][b]Have fun![/font][/b]
"}
src.icon = 'turfs1.dmi'
src.icon_state = "none"
src.loc=locate(5,9,2)


P.S.
I replaced the HTML tags with [ ]'s.
In response to Hi1
That's what you want to show up when people load or create a new character ?

No usr in procs, by the way.
In response to Andre-g1
No, that is what they see when they log in, then it takes them to the title icon, then this:
turf/NewChar
icon = 'new.bmp'
Click()
usr.name = input("Please type a name. (Please none from the Anime/Manga!)")as text
usr.noname()


turf/BG
icon = 'water_demon2.bmp'



mob/verb
Save_()
usr.Save()
usr<<"Saving..."
sleep(05)
usr<<"<b>Saved</b>"

mob
proc/Save()
var/savefile/F = new("/Players/[src.ckey].sav")
Write(F)
F["src"] << src


var/X
var/Y
var/Z

proc/Load()
var/savefile/F = new("/Players/[src.ckey].sav")
Read(F)
F["src"] >> src
src.icon = 'Icons1/Base.dmi'
src.loc=locate( X, Y, Z)

turf/LoadChar
icon = 'load.bmp'
Click()
src.Load()
world<<"* <small><font color=blue>[usr.ckey] has connected.</font>"
In response to Hi1
turf/LoadChar
icon = 'load.bmp'
Click(mob/M)
M.Load()
world<<"* <small><font color=blue>[usr.ckey] has connected.</font>"


Try that.
In response to Hi1
Then what exactly do you want it to do? You weren't really specific on your first post.
In response to A.T.H.K
No need to define mob/M. Like I said, usr is enough in Click()

 turf/LoadChar
icon = 'load.bmp'
Click()
usr.Load()
world<<"* <small><font color=blue>[usr.ckey] has connected.</font>"

In response to Andre-g1
Andre-g1 wrote:
Then what exactly do you want it to do? You weren't really specific on your first post.

Please just stop asking questions you have made this post long enough.

"it dosen't fully load. It loads the users X, Y, Z, and Hair...that's it...no icons or anything!"

... READ ...
In response to A.T.H.K
Please don't just guess something up and throw it over as a suggestion to fix a problem. This, and you, are both wrong. If you don't know how to help, simply don't try to help. Not to mention something you should also do is refrain from replying to a topic before reading it in whole, since this problem was already solved correctly before you posted.
In light of the above you also shouldn't try to educate others on how they should post, really; there's nothing wrong with asking questions to get a better view of the situation and being more able to help afterwards, neither is there anything wrong with longer topics. The unneeded extra length to the topic was your post in fact, since the topic's purpose is for the guy to get help with his problem, not for the topic to be short.
In response to Kaioken
You always have something to say don't you...
In response to A.T.H.K
That didnt work...
This is the whole file:

turf/NewChar
icon = 'new.bmp'
Click(mob/M)
usr.name = input("Please type a name. (Please none from the Anime/Manga!)")as text
usr.noname()


turf/BG
icon = 'water_demon2.bmp'



mob/verb
Save_()
usr.Save()
usr<<"Saving..."
sleep(05)
usr<<"<b>Saved</b>"

mob
proc/Save()
var/savefile/F = new("/Players/[src.ckey].sav")
Write(F)
F["src"] << src


var/X
var/Y
var/Z

proc/Load()
var/savefile/F = new("/Players/[src.ckey].sav")
Read(F)
F["src"] >> sr
src.icon = 'Icons1/Base.dmi'
src.loc=locate( X, Y, Z)

turf/LoadChar
icon = 'load.bmp'
Click(mob/M)
M.Load()
world<<"* <small><font color=blue>[usr.ckey] has connected.</font>"


turf/NewVillage
icon = 'village.bmp'
Click(mob/M)
switch(alert("Please choose your village.","Village","Leaf","Mist"))
if ("Leaf")
usr.village = "Leaf"
if ("Mist")
usr.village = "Mist"

turf/NewClan
icon = 'clan.bmp'
Click(mob/M)
switch(alert("Please choose your clan.","Clan","Uchiha","Hyuuga"))
if ("Uchiha")
usr.clan = "Uchiha"
if ("Hyuuga")
usr.clan = "Hyuuga"

turf/NewBody
icon = 'body.bmp'
Click(mob/M)
switch(alert("Please choose your gender.","Body","Male","Female"))
if ("Male")
usr.icon = 'Icons1/Base.dmi'
usr.hasbody = 1
if ("Female")
alert("Sorry, we are currently making the Female base!")
return ..()
turf/Finished
icon = 'finished.bmp'
Click(mob/M)
alert("Welcome to the newest non-ripped Naruto game on BYOND, NRotN!")
usr.body()

turf/Hair
icon = 'hair.bmp'
Click(mob/M)
var/hair = input("What Hair Style would you like?","Hair") in list("Afro","Long","Mohawk","Orochimaru","Sasuke","Shikamaru","Short","Spikey","Temari","Kakashi")
switch(hair)
if("Afro")
usr.overlays += 'overlays/Afro.dmi'
if("Long")
usr.overlays += 'overlays/Long.dmi'
if("Mohawk")
usr.overlays += 'overlays/Mohawk.dmi'
if("Orochimaru")
usr.overlays += 'overlays/Oro.dmi'
if("Sasuke")
usr.overlays += 'overlays/Sasuke.dmi'
if("Shikamaru")
usr.overlays += 'overlays/Shik.dmi'
if("Short")
usr.overlays += 'overlays/Short.dmi'
if("Spikey")
usr.overlays += 'overlays/Spikey.dmi'
if("Temari")
usr.overlays += 'overlays/Temari.dmi'
if("Kakashi")
usr.overlays += 'overlays/Kakashi.dmi'
alert("Hair Colors will be comming soon!")

mob/proc
body()
if(src.hasbody == 0)
alert("You must pick a Body Icon!")
return ..()
if(src.hasbody == 1)
src.loc=locate(5,2,1)

mob/proc
noname()
if(src.name == "" | src.name == " " | src.name == "Hi1" | src.name == "Yaniyugi10" | src.name == "hi1" | src.name == "yaniyugi10" | src.name == " ")
alert("~Invalid name~")
return ..()
else
src.loc=locate(35,6,2)
In response to Hi1
Don't post the whole file every time, only the relevant parts. And read all replies to a topic; A.T.H.K was wrong in guessing the solution, and the correct one was given to you before he ever stumbled into the topic.