ID:1441881
 
(See the best response by Ter13.)
Code:
var/FileName="Players/[ckey(src.key)].sav

if(choose=="Load")
if(fexists("Players/[ckey(src.key)].sav"))
var/savefile/F=new("Players/[ckey(src.key)].sav")
F["Icon"]>>src.icon
F["Icon State"]>>src.icon_state
F["Verbs"]>>src.verbs


Problem description:One thing is that it loads my icon blank. I am invisible when I load. Another thing is that it gives me an error when I try to load my verb list.
I'm not entirely sure if this could cause your save system to malfunction all together, but loading your verbs into a variable and then adding that variable to your verbs might help.
mob/verb/Save()
var/savefile/S=new("Save")
S["icon"]<<src.icon
S["icon_state"]<<src.icon_state
S["verbs"]<<src.verbs

mob/verb/Load()
var/savefile/S=new("Save")
S["icon"]>>src.icon
S["icon_state"]>>src.icon_state
if("verbs" in S)//Make sure it exists
var/savedVerbs
S["verbs"]>>savedVerbs
src.verbs+=savedVerbs


If your other problems are not fixed once you've applied the change, please post your save script as well.
yeah i loaded verbs to variables then added them. i just dont get why i cant save and load my icon state
Try not using a space in the save index, that might be throwing things off; and if all else fails, output the value you're loading before you load it into a variable, if it's empty then it's either not saving right or you're not loading it properly.
Here is the save verb and the load verb I made for testing:

mob/verb/save()
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName)) fdel(FileName)
if(usr.phase1||usr.phase2||usr.phase3||usr.phase4||usr.inturny)
usr << "You can't save here!"
return
src.playedandsaved=1
var/savefile/F=new(FileName)
F["Icon State"]<<src.icon_state

mob/verb/load()
var/FileName="Players/[ckey(src.key)].sav"
if(usr.phase1||usr.phase2||usr.phase3||usr.phase4||usr.inturny)
usr << "You can't save here!"
return
src.playedandsaved=1
var/savefile/F=new(FileName)
F["Icon State"]>>src.icon_state


When I save and use the load verb, it works. But when I load from Login() my character comes out naked and icon state var is blank.

In this game code(another game of mine) the icon and the icon state both work:

mob/verb/Save()
set category="Saving"
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName)) fdel(FileName)
var/savefile/F=new(FileName)
F["Icon"]<<src.icon
F["Icon State"]<<src.icon_state

mob/verb/Load()
set category="Saving"
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName))
var/savefile/F=new(FileName)
F["Icon"]>>src.icon
F["Icon State"]>>src.icon_state
You really shouldn't be saving icons or verbs for this reason; it just causes unexpected headaches. These things should be generated at loadtime based on other saved variables.

Saving verbs/icons/overlays is a bad habit that's been passed down since the time when I was new here.

For further information, refer to my saving tutorial.

Second, if the verb works, but doing so from login doesn't, I suspect your Login code is the culprit, and not the save/load verb.
Again, what is the save proc that you are using in the system that isn't working?
In response to Ss4toby
This one:

mob/verb/save()
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName)) fdel(FileName)
if(usr.phase1||usr.phase2||usr.phase3||usr.phase4||usr.inturny)
usr << "You can't save here!"
return
src.playedandsaved=1
var/savefile/F=new(FileName)
F["Icon State"]<<src.icon_state
In response to TheDarkChakra
TheDarkChakra wrote:
This one:

mob/verb/save()
> var/FileName="Players/[ckey(src.key)].sav"
> if(fexists(FileName)) fdel(FileName)
> if(usr.phase1||usr.phase2||usr.phase3||usr.phase4||usr.inturny)
> usr << "You can't save here!"
> return
> src.playedandsaved=1
> var/savefile/F=new(FileName)
> F["Icon State"]<<src.icon_state


From the code you linked, you are never actually saving anything but the icon state.
In response to Ter13
Its actually part of a bigger code. There is more.
In response to TheDarkChakra
TheDarkChakra wrote:
Its actually part of a bigger code. There is more.

I am beginning to suspect that I am Sisyphus reincarnated.
In response to Ter13
Want me paste here the whole saving verb? Loading also?
In response to TheDarkChakra
TheDarkChakra wrote:
Want me paste here the whole saving verb? Loading also?

Well, to be honest, it sounds like the issue is in your Login proc, but it sounds like you are still doing saving wrong anyway. I strongly advise taking a look at my tutorial regarding saving and marking variables as temporary, because you shouldn't have to specify what need to be saved, just what doesn't need to be saved.

But yeah, sure. You probably should have done that from the beginning if you are seeking help with it.
Okay let me paste you everything but its quite long:

mob/verb/save()
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName)) fdel(FileName)
if(usr.phase1||usr.phase2||usr.phase3||usr.phase4||usr.inturny)
usr << "You can't save here!"
return
src.playedandsaved=1
var/savefile/F=new(FileName)
F["Icon State"]<<src.icon_state
F["Name"]<<src.name
F["Max Hp"]<<src.max_hp
F["Hp"]<<src.hp
F["Nen type"]<<src.nen_type
F["Nen power"]<<src.nen_power
F["Str"]<<src.str
F["Def"]<<src.def
F["X"]<<src.x
F["Y"]<<src.y
F["Z"]<<src.z
F["Gold"]<<src.gold
F["Talent"]<<src.talent
F["Max Nen Power"]<<src.max_nen_power
F["In gyo"]<<src.ingyo
F["In Ten"]<<src.inten
F["In Zetsu"]<<src.inzetsu
F["In Ren"]<<src.inren
F["In Ken"]<<src.inken
F["Stamina"]<<src.stamina
F["Max Stamina"]<<src.maxstamina
F["In en"]<<src.inen
F["Ko"]<<src.ko
F["lvl str"]<<src.lvlstr
F["lvl def"]<<src.lvldef
F["lvl hp"]<<src.lvlhp
F["lvl sta"]<<src.lvlsta
F["Banned"]<<src.banned
F["played"]<<src.playedandsaved
F["numbericon"]<<src.numbericon
F["Gold"]<<src.gold
F["Arena"]<<src.arenafloor
F["Reg Arena"]<<src.registeredarena
F["In turny"]<<src.inturny
F["Know Ten"]<<src.knowten
F["Know Ren"]<<src.knowren
F["Know Ken"]<<src.knowken
F["Know Zetsu"]<<src.knowzetsu //need add en, in, gyo
F["Perc Ten"]<<src.percten
F["Perc Ren"]<<src.percren
F["Perc Ken"]<<src.percken
F["Perc Zetsu"]<<src.perczetsu
F["Know Nen"]<<src.knownen
F["Know Gym"]<<src.knowgym
F["Know Nrg Ball"]<<src.knowenergyball
F["Nrg Ball Pawa"]<<src.energyballpawa
F["Inventory"]<<src.contents
F["z_head"]<<src.z_head
F["z_arms"]<<src.z_arms
F["z_torso"]<<src.z_torso
F["z_legs"]>>src.z_legs
F["z_atk"]<<src.z_atk
F["s_head"]<<src.s_head
F["s_arms"]<<src.s_arms
F["s_torso"]<<src.s_torso
F["s_legs"]<<src.s_legs
F["s_atk"]<<src.s_atk
F["q_head"]<<src.q_head
F["q_arms"]<<src.q_arms
F["q_torso"]<<src.q_torso
F["q_legs"]<<src.q_legs
F["q_atk"]<<src.q_atk
F["w_head"]<<src.q_head
F["w_arms"]<<src.w_arms
F["w_torso"]<<src.w_torso
F["w_legs"]<<src.w_legs
F["w_atk"]<<src.w_atk
F["x_head=25"]<<src.x_head
F["x_arms"]<<src.x_arms
F["x_torso"]<<src.x_torso
F["x_legs"]<<src.x_legs
F["x_atk"]<<src.x_atk
F["a_head"]<<src.a_head
F["a_arms"]<<src.a_arms
F["a_torso"]<<src.a_torso
F["a_legs"]<<src.a_legs
F["a_atk"]<<src.a_atk
F["c_head"]<<src.c_head
F["c_arms"]<<src.c_arms
F["c_torso"]<<src.c_torso
F["c_legs"]<<src.c_legs
F["c_atk"]<<src.c_atk
F["Know Energy Ball"]<<src.knowenergyball
F["Know Energy Ball Power"]<<src.energyballpawa
F["Target Person"]<<src.target_person
F["Know Lightning Palm"]<<src.knowlightningpalm
F["Know Thunderbolt"]<<src.knowthunderbolt
F["Know fireball"]<<src.knowfireball
F["Fireball Power"]<<src.fireballpawa
F["Know laser"]<<src.knowlaser
F["Know laser power"]<<src.laserpawa
F["Know laser"]<<src.knowlaser
F["Know Miasma"]<<src.knowmiasma
F["Know Corrosion"]<<src.knowcorr
F["Know Summon"]<<src.knowsum
F["Beast"]<<src.beast
F["Know Tennis"]<<src.knowtennis
F["Know Hallucination"]<<src.knowhall
F["Heal Field"]<<src.healfield
F["Sap Blast"]<<src.knowsapblast
F["Sap Blast Power"]<<src.sapblastpawa
F["Speed"]<<src.speed
F["Enhanced Strength Power"]<<src.enhstrpawa
F["Know Enhanced Strength"]<<src.knowenhstr
F["Know Number Can Enhance"]<<src.knownumcanenh //how many things can enhance at a time
F["Know Number Can Enhance Level"]<<src.knownumcanenhlvl //when to level up knownumcanenh
F["Enhance Something"]<<src.enhsumthing //how much enhancing at the same time
F["Enhanced Strength"]<<src.enhancedstr //how much enhanced atk pawa
F["Enhanced Def"]<<src.enhanceddef
F["Know Enhanced Defense"]<<src.knowenhdef
F["Enhanced Defense Power"]<<src.enhanceddefpawa
F["Know enhanced stamina"]<<src.knowenhsta
F["Enhanced stamina"]<<src.enhancedsta
F["Enhanced stamina power"]<<src.enhancedstapawa
F["Know Enhanced Healing"]<<src.knowenhhea
F["Know enhanced healing"]<<src.enhancedhea
F["Enhanced healing power"]<<src.enhancedheapawa
F["Know enhanced speed"]<<src.knowenhspd
F["Enhanced speed"]<<src.enhancedspd
F["Level speed"]<<src.lvlspd
F["Enhanced speed power"]<<src.enhancedspdpawa
F["Regular Def"]<<src.regulardef
F["Conjure Knife"]<<src.conjure_knife
F["Conjure Bazooka"]<<src.conjure_bazooka
F["Conjure Scythe"]<<src.conjure_scythe
F["Conjure Sword"]<<src.conjure_sword
F["Conjure Dagger"]<<src.conjure_dagger
F["Conjure Dagger"]<<src.conjure_bomb
F["Conjure Shuriken"]<<src.conjure_shuriken
F["Conjure Bow"]<<src.conjure_bow
F["Conjure Bat"]<<src.conjure_bat
F["Conjure Shield"]<<src.conjure_shield
F["Weapon"]<<src.w
F["Verbs"]<<src.verbs
src << "[src] you have been saved"

ob/player/Login()
world << sound('bell.ogg')
// if(src.key!="Dariuc" && src.key!="TheDarkChakra" && src.key!="Sers000" && src.key!="FallenPhenix" && src.key!="BBDragoon" && src.key!="Neimo" && src.key!="Konlet")
// src << "Sorry, the game is under testing right now so I can't have you play now."
// del src
updateScoreboard(src)
world << "[src.key] key has logged in"
src << "Hello. I am TheDarkChakra. I created this game. I would appreciate it if you told me on the forums or by emailing me at ssunlimitedssu@yahoo.com if I should make this into a full game or not. If you have any comments, suggestions, or complains please contact me through there. Please talk to Wing(the guy in white) to find out how to play."
src.invisibility=0
if(src.key=="TheDarkChakra"||src.key=="Sers000"||src.key=="Dariuc")
src.verbs+=typesof(/mob/admin/verb/)
src.verbs+=typesof(/mob/trainning/verb)
src<<"[src] you are an admin"
if(src.key=="Yut Put"||src.key=="EmpirezTeam" || src.key=="Vrocaan"||src.key=="Dr.Penguin"|| src.key=="Jeneric"||src.key=="Falcon lazorz")
alert("You trolls can't play this game")
del src
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName))
var/savefile/F=new(FileName)
F["Banned"]>>src.banned
if(src.banned)
alert("You are banned")
del src
BEGIN
if(fexists("Players/[ckey(src.key)].sav"))
var/savefile/F =new("Players/[ckey(src.key)].sav")
F["played"] >> src.playedandsaved
BEGINTWO
var/choose=input("New, Load or Delete Character") in list ("New", "Load", "Delete")
if(choose=="New")
NAME
var/namee=input("Enter a name") as text
if(namee=="")
alert("Choose a name!")
goto NAME
else src.name=namee
if(src.playedandsaved==1)
alert("You already have a filename. Delete your save file.")
goto BEGINTWO
else
var/nen_typei=pick("Enhancement", "Transmutation", "Emission", "Conjuration", "Manipulation", "Specialization")
src.hp=rand(10,150)
if(src.hp<25)
src << "You were born with low hp"
else if(src.hp>=25 && src.hp<50)
src << "You were born with an average hp"
else if(src.hp>50 && src.hp<100)
src << "You were born with an above average hp"
else if(src.hp>100)
src << "You were born with an extraordinary amount of hp"
src.max_hp=src.hp//torso
src.nen_power=rand(100,1000)//power of aura(might change that)
src.max_nen_power=src.nen_power
nen_type=nen_typei
if(nen_type=="Enhancement")
nen_enhancer=100
nen_emitter=80
nen_transmuter=80
nen_conjurer=60
nen_specialization=0
nen_manipulator=60
else if(nen_type=="Transmutation")
nen_enhancer=80
nen_emitter=80
nen_transmuter=100
nen_conjurer=80
nen_specialization=0
nen_manipulator=40
else if(nen_type=="Emission")
nen_enhancer=80
nen_emitter=100
nen_transmuter=60
nen_conjurer=40
nen_specialization=0
nen_manipulator=80
else if(nen_type=="Conjuration")
nen_enhancer=60
nen_emitter=40
nen_transmuter=80
nen_conjurer=100
nen_specialization=0
nen_manipulator=60
else if(nen_type=="Manipulation")
nen_enhancer=60
nen_emitter=80
nen_transmuter=40
nen_conjurer=60
nen_specialization=0
nen_manipulator=100
else if(nen_type=="Specialization")
nen_enhancer=40
nen_emitter=60
nen_transmuter=60
nen_conjurer=80
nen_specialization=100
nen_manipulator=80
head=25 //might change as in in ten always
arms=25
torso=25
legs=25
str=rand(1, 100)//arms
if(str<=5)
src << "You were born really weak."
else if(str<=15 && str>5)
src << "You were born weak."
else if(str>15 && str<=30)
src << "You have a fair amount of strength."
else if(str>30 && str<=50)
src << "You have an average amount of strength."
else if(str>50 && str<=75)
src << "You have a good amount of strength."
else if(str>75 && str<=100)
src << "You were born strong."
else if(str>100 && str<=150)
src << "You were born very strong."
def=rand(1,100)//torso
if(def<=5)
src << "You were born with really weak defenses."
else if(def<=15 && def>5)
src << "You were born with weak defenses."
else if(def>15 && def<=30)
src << "You have a fair amount of defense."
else if(def>30 && def<=50)
src << "You have an average amount of defense."
else if(def>50 && def<=75)
src << "You have a good amount of defense."
else if(def>75 && def<=100)
src << "You were born with a very good defense."
else if(def>100 && def<=150)
src << "You were born with an extraordinary amount of defense."
inten=0
talent=1
src << "You were born with [usr.talent] out of 10 talent."
inzetsu=0
ingyo=0
vow=1
emotion=1
item_str=0
inken=0
armsnen=0
legsnen=0
torsonen=0
headnen=0
overallnen=0
caughtjail=0
stamina=rand(10,200)//run, legs
maxstamina=src.stamina
inen=0
equippeditem=null
equippediteminin=0
wearing_arms=0
wearing_legs=0
wearing_torso=0
didsquats=0
didpushups=0
didsitups=0
intrainning=0
talkedexam=0
papertest=FALSE
treadmill=FALSE
punchingbag=FALSE
passed=0
makingcharacter=1
ko=0
knownen=0
nonhuman=0
inren=0
lvlstr=0//arms
lvldef=0//torso
lvlsta=0//legs
lvlhp=0//torso
banned=0
src.loc=locate(45,32,6)
src << sound(null)
src << sound('waiting.wma',1)
speed=rand(10,100)
var/obj/weapon/randitem=pick("Shuriken","Dagger","Knife","Scythe","Bat", "Bow")
if(randitem=="Shuriken")
src.contents+=new/obj/weapon/shuriken
if(randitem=="Dagger")
src.contents+=new/obj/weapon/dagger
if(randitem=="Knife")
src.contents+=new/obj/weapon/knife
if(randitem=="Scythe")
src.contents+=new/obj/weapon/scythe
if(randitem=="Bat")
src.contents+=new/obj/weapon/bat
if(randitem=="Bow")
src.contents+=new/obj/weapon/bow
src << "You got [randitem]!"
var/obj/weapon/we=locate() in src.contents
src.s_atk=we.name
src.whichweapon=we.name
src.w=we
alert("Choose your icon")
if(choose=="Load")
if(fexists(FileName))
var/savefile/F=new(FileName)
src.icon='Characters.dmi'
F["Icon State"]>>src.icon_state
F["Name"]>>src.name
F["Max Hp"]>>src.max_hp
F["Hp"]>>src.hp
F["Nen type"]>>src.nen_type
F["Nen power"]>>src.nen_power
F["Str"]>>src.str
F["Def"]>>src.def
F["X"]>>src.x
F["Y"]>>src.y
F["Z"]>>src.z
F["Gold"]>>src.gold
F["Talent"]>>src.talent
F["Making Character"]>>src.makingcharacter
F["Max Aura Power"]>>src.max_nen_power
F["In gyo"]>>src.ingyo
F["In Ten"]>>src.inten
F["In Zetsu"]>>src.inzetsu
F["In Ren"]>>src.inren
F["In Ken"]>>src.inken
F["Stamina"]>>src.stamina
F["Max Stamina"]>>src.maxstamina
F["In en"]>>src.inen
F["Ko"]>>src.ko
F["lvl str"]>>src.lvlstr
F["lvl def"]>>src.lvldef
F["lvl hp"]>>src.lvlhp
F["lvl sta"]>>src.lvlsta
F["Banned"]>>src.banned
F["played"]>>src.playedandsaved
F["numbericon"]>>src.numbericon
F["Gold"]>>src.gold
F["Arena"]>>src.arenafloor
F["Reg Arena"]>>src.registeredarena
F["In turny"]>>src.inturny
F["Know Ten"]>>src.knowten
F["Know Ren"]>>src.knowren
F["Know Ken"]>>src.knowken
F["Know Zetsu"]>>src.knowzetsu //need add en, in, gyo
F["Perc Ten"]>>src.percten
F["Perc Ren"]>>src.percren
F["Perc Ken"]>>src.percken
F["Perc Zetsu"]>>src.perczetsu
F["Know Nen"]>>src.knownen
F["Know Gym"]>>src.knowgym
F["Know Nrg Ball"]>>src.knowenergyball
F["Nrg Ball Pawa"]>>src.energyballpawa
F["Inventory"]>>src.contents
F["z_head"]>>src.z_head
F["z_arms"]>>src.z_arms
F["z_torso"]>>src.z_torso
F["z_legs"]>>src.z_legs
F["z_atk"]>>src.z_atk
F["s_head"]>>src.s_head
F["s_arms"]>>src.s_arms
F["s_torso"]>>src.s_torso
F["s_legs"]>>src.s_legs
F["s_atk"]>>src.s_atk
F["q_head"]>>src.q_head
F["q_arms"]>>src.q_arms
F["q_torso"]>>src.q_torso
F["q_legs"]>>src.q_legs
F["q_atk"]>>src.q_atk
F["w_head"]>>src.q_head
F["w_arms"]>>src.w_arms
F["w_torso"]>>src.w_torso
F["w_legs"]>>src.w_legs
F["w_atk"]>>src.w_atk
F["x_head=25"]>>src.x_head
F["x_arms"]>>src.x_arms
F["x_torso"]>>src.x_torso
F["x_legs"]>>src.x_legs
F["x_atk"]>>src.x_atk
F["a_head"]>>src.a_head
F["a_arms"]>>src.a_arms
F["a_torso"]>>src.a_torso
F["a_legs"]>>src.a_legs
F["a_atk"]>>src.a_atk
F["Know Energy Ball"]>>src.knowenergyball
F["Know Energy Ball Power"]>>src.energyballpawa
F["Target Person"]>>src.target_person
F["Know Lightning Palm"]>>src.knowlightningpalm
F["Know Thunderbolt"]>>src.knowthunderbolt
F["Know fireball"]>>src.knowfireball
F["Fireball Power"]>>src.fireballpawa
F["Know laser"]>>src.knowlaser
F["Know laser power"]>>src.laserpawa
F["Know laser"]>>src.knowlaser
F["Know Miasma"]>>src.knowmiasma
F["Know Corrosion"]>>src.knowcorr
F["Know Summon"]>>src.knowsum
F["Beast"]>>src.beast
F["Know Tennis"]>>src.knowtennis
F["Know Hallucination"]>>src.knowhall
F["Heal Field"]>>src.healfield
F["Sap Blast"]>>src.knowsapblast
F["Sap Blast Power"]>>src.sapblastpawa
F["Speed"]>>src.speed
F["Enhanced Strength Power"]>>src.enhstrpawa
F["Know Enhanced Strength"]>>src.knowenhstr
F["Know Number Can Enhance"]>>src.knownumcanenh //how many things can enhance at a time
F["Know Number Can Enhance Level"]>>src.knownumcanenhlvl //when to level up knownumcanenh
F["Enhance Something"]>>src.enhsumthing //how much enhancing at the same time
F["Enhanced Strength"]>>src.enhancedstr //how much enhanced atk pawa
F["Enhanced Def"]>>src.enhanceddef
F["Know Enhanced Defense"]>>src.knowenhdef
F["Enhanced Defense Power"]>>src.enhanceddefpawa
F["Know enhanced stamina"]>>src.knowenhsta
F["Enhanced stamina"]>>src.enhancedsta
F["Enhanced stamina power"]>>src.enhancedstapawa
F["Know Enhanced Healing"]>>src.knowenhhea
F["Know enhanced healing"]>>src.enhancedhea
F["Enhanced healing power"]>>src.enhancedheapawa
F["Know enhanced speed"]>>src.knowenhspd
F["Enhanced speed"]>>src.enhancedspd
F["Level speed"]>>src.lvlspd
F["Enhanced speed power"]>>src.enhancedspdpawa
F["Regular Def"]>>src.regulardef
F["Conjure Knife"]>>src.conjure_knife
F["Conjure Bazooka"]>>src.conjure_bazooka
F["Conjure Scythe"]>>src.conjure_scythe
F["Conjure Sword"]>>src.conjure_sword
F["Conjure Dagger"]>>src.conjure_dagger
F["Conjure Dagger"]>>src.conjure_bomb
F["Conjure Shuriken"]>>src.conjure_shuriken
F["Conjure Bow"]>>src.conjure_bow
F["Conjure Bat"]>>src.conjure_bat
F["Conjure Shield"]>>src.conjure_shield
F["Weapon"]>>src.w
F["Verbs"]>>src.verblist
// src.verbs+=src.verblist fix this wrong type of value for text
/* if(src.knownen)
src.verbs+=/mob/player/nen/verb/Ten
if(src.knowzetsu)
src.verbs+=/mob/player/nen/verb/Zetsu
if(src.knowren)
src.verbs+=/mob/player/nen/verb/Ren
if(src.knowken)
src.verbs+=/mob/player/nen/verb/Ken
if(src.knowgym)
usr.verbs+=typesof(/mob/trainning/verb)*/

if(src.banned)
alert("You are banned")
del src
world << "[src.key] key has logged in as [src.name]"
else goto BEGIN
if(choose=="Delete")
if(fexists("Players/[ckey(src.key)].sav"))
fdel("Players/[ckey(src.key)].sav")
world << "Character deleted"
src.playedandsaved=0
goto BEGIN
else
alert("You have no filename")
goto BEGIN
..()
Best response
No. That is exactly what you should not be doing, TDC. I strongly urge you to read my tutorial on saving, because this is hopelessly beyond repair, and you are doing work that should never have to be done. It's just going to slow your game down, and make it unmaintainable.

http://www.byond.com/forum/?post=1187245

You need to understand that saving is as simple as f << src if you set up the object templates right the first time, and anywhere you need to change it, Write()/Read() overrides more than suffice.

This is entirely the wrong way to handle all of this. Notable examples:

if(src.banned)
alert("You are banned")
del src
world << "[src.key] key has logged in as [src.name]"


You should be checking for client bans at client.New()

goto BEGIN


you should not be using goto.

if(choose=="Delete")


Your codepaths are ambiguous and utterly wasteful.

if(src.key=="Yut Put"||src.key=="EmpirezTeam" || src.key=="Vrocaan"||src.key=="Dr.Penguin"|| src.key=="Jeneric"||src.key=="Falcon lazorz")
alert("You trolls can't play this game")
del src


This shouldn't be a series of || operations, but rather a list of hardcoded bans. And second... Really?

alert("You have no filename")


Then why give them the option to delete the file at all?

if(str<=5)
src << "You were born really weak."
else if(str<=15 && str>5)


If you did this in reverse, it'd actually be cleaner, and only require one comparison per branch:

if(str>90)
else if(str>80)
else if(str>60)
else if(str>50)
else


Also, character creation should be in a separate proc from your savefile handling, rather than making this ugly behemoth of confusion. That way you could properly debug issues like this.

You've learned some genuinely terrible habits, and you need to stop and listen to me for once: Read my tutorial I've told you a number of times to do so, but you have ignored the advice thus far. It will clear up a number of these problems for you.
In response to Ter13
Hey thanks. Even though I need to learn how to do all those things. I am still not good at DM. I will read that tutorial of yours now. Before, I didn't know where it was.
In response to Ter13
So I read the tutorial and tried saving by doing F<<src and then F<<src.icon_state and loading them back the same way with >> but it didn't work. What am I doing wrong?
In response to TheDarkChakra
TheDarkChakra wrote:
So I read the tutorial and tried saving by doing F<<src and then F<<src.icon_state and loading them back the same way with >> but it didn't work. What am I doing wrong?

Did you read the second part? Because if you read the tutorial to its conclusion, you shouldn't have to be specifying what variables to save and what variables to load.
In response to Ter13
Wait I'm supposed to read Part 2 too?
Well... Yeah?

Also:

I know you didn't read the first part to a level where you understood it. Otherwise, you would not have asked either question. I highly advise you reread the section titled: The Neglected Temporary Variable from part #1.
Page: 1 2 3