ID:141229
 
Hitting save always pops up boxes asking if BYOND can have access to the file or whatever, and it keeps popping up and I keep clicking yes and then my computer freezes and I get a ton of "Low on memory." errors.

This also outputs on my game's screen to me:

runtime error: bad output
proc name: Save (/mob/commands/verb/Save)
usr: Abu the Ham-Ham (/mob)
src: Abu the Ham-Ham (/mob)
call stack:
Abu the Ham-Ham (/mob): Save()
Abu the Ham-Ham (/mob): Save()
Abu the Ham-Ham (/mob): Save()
runtime error: bad savefile or list
proc name: Save (/mob/commands/verb/Save)
usr: Abu the Ham-Ham (/mob)
src: Abu the Ham-Ham (/mob)
call stack:
Abu the Ham-Ham (/mob): Save()
Abu the Ham-Ham (/mob): Save()

Also, when people hit load in my game, the same thing happens and I have to restart my computer and rehost.

Is this normal :3?


If you care at all, here's my Save verb and the load option.

mob/commands
verb
Save()
set category="Chat"
usr.update = 2
var/savefile/save
save = new ("Save Files/[usr:ckey]")
save["Shadow"] << usr:Shadow
save["Hyper"] << usr:Hyper
save["namecolor"] << usr:namecolor
save["chatcolor"] << usr:chatcolor
save["themesong"] << usr:themesong
save["iiiicon"] << usr:iiiicon
save["update"] << usr:update
save["exp"] << usr:exp
save["expnext"] << usr:expnext
save["verbs"] << usr:verbs
save["haveslow"] << usr:haveslow
save["haveinstele"] << usr:haveinstele
save["havetele"] << usr:havetele
save["heck"] << usr:heck
save["iicon"] << usr:iicon
save["isperson"] << usr:isperson
save["name"] << usr:name
save["underlays"] << usr:underlays
save["SSJ"] << usr:SSJ
save["hasSSJ"] << usr:hasSSJ
save["level"] << usr:level
save["contents"] << usr:contents
save["description"] << usr:description
save["Love_Status"] << usr:Love_Status
save["agee"] << usr:agee
save["genderrr"] << usr:genderrr
save["rname"] << usr:rname
save["maxMP"] << usr:maxMP
save["MP"] << usr:MP
save["initialMP"] << usr:initialMP
save["initialHP"] << usr:initialHP
save["maxHP"] << usr:maxHP
save["HP"] << usr:HP
save["vit"] << usr:vit
save["str"] << usr:str
save["agi"] << usr:agi
save["dex"] << usr:dex
save["int"] << usr:int
save["luk"] << usr:luk
save["Coins"] << usr:Coins
save["icon_state"] << usr:icon_state
save["icon"] << usr:icon
save["arrow"] << usr:arrow
save["move"] << usr:move
save["pixel_step_size"] << usr:pixel_step_size
save["haveslow"] << usr:haveslow
save["partner"] << usr:partner
save["iiiicon"] << usr:iiiicon
save["themesong"] << usr:themesong
save["Coins"] << usr:Coins
save["selling"] << usr:selling
save["Custom"] << usr:Custom
save["Ham"] << usr:Ham
save["CoinsMade"] << usr:CoinsMade
save["abutourneydid"] << usr:abutourneydid
save["Flower"] << usr:Flower
save["accesory"] << usr:accesory
save["Wearing"] << usr:Wearing
save["Crit"] << usr:Crit
save["ATKSPD"] << usr:ATKSPD
save["x"] << usr:x
save["y"] << usr:y
save["z"] << usr:z
Write(save)
usr << "Saved."



Loading:

client
Center()
if(usr.loc == locate(1,5,18))
if(fexists("Save Files/[usr:ckey]"))
var/savefile/load = new ("Save Files/[usr:ckey]")
usr.Read(load)
load["themesong"] >> usr:themesong
load["update"] >> usr:update
load["exp"] >> usr:exp
load["expnext"] >> usr:expnext
load["haveslow"] >> usr:haveslow
load["haveinstele"] >> usr:haveinstele
load["havetele"] >> usr:havetele
load["heck"] >> usr:heck
load["iicon"] >> usr:iicon
load["isperson"] >> usr:isperson
load["name"] >> usr:name
load["level"] >> usr:level
load["contents"] >> usr:contents
load["description"] >> usr:description
load["Love_Status"] >> usr:Love_Status
load["agee"] >> usr:agee
load["genderrr"] >> usr:genderrr
load["rname"] >> usr:rname
load["maxMP"] >> usr:maxMP
load["MP"] << usr:MP
load["initialMP"] >> usr:initialMP
load["initialHP"] >> usr:initialHP
load["maxHP"] >> usr:maxHP
load["HP"] >> usr:HP
load["vit"] >> usr:vit
load["str"] >> usr:str
load["agi"] >> usr:agi
load["dex"] >> usr:dex
load["int"] >> usr:int
load["luk"] >> usr:luk
load["Coins"] >> usr:Coins
load["icon_state"] >> usr:icon_state
load["icon"] >> usr:icon
load["arrow"] >> usr:arrow
load["move"] >> usr:move
load["pixel_step_size"] >> usr:pixel_step_size
load["x"] >> usr:x
load["y"] >> usr:y
load["z"] >> usr:z
load["iiiicon"] >> usr:iiiicon
load["underlays"] >> usr:underlays
load["SSJ"] >> usr:SSJ
load["hasSSJ"] >> usr:hasSSJ
load["Shadow"] >> usr:Shadow
load["Hyper"] >> usr:Hyper
load["namecolor"] >> usr:namecolor
load["chatcolor"] >> usr:chatcolor
load["haveslow"] >> usr:haveslow
load["partner"] >> usr:partner
load["iiiicon"] >> usr:iiiicon
load["themesong"] >> usr:themesong
load["Coins"] >> usr:Coins
load["selling"] >> usr:selling
load["Custom"] >> usr:Custom
load["Ham"] >> usr:Ham
load["CoinsMade"] >> usr:CoinsMade
load["abutourneydid"] >> usr:abutourneydid
load["Flower"] >> usr:Flower
load["accesory"] >> usr:accesory
load["Wearing"] >> usr:Wearing
load["Crit"] >> usr:Crit
load["ATKSPD"] >> usr:ATKSPD
usr.hasplayer = 1
usr << "Loaded."
if(usr.iiiicon == "Ham test.dmi")
usr:verbs += /mob/emotions/Hamtaro/verb/Scared
usr:verbs += /mob/emotions/Hamtaro/verb/Sad
usr:verbs += /mob/emotions/Hamtaro/verb/Sit
usr:verbs += /mob/emotions/Hamtaro/verb/Stance
usr:verbs += /mob/emotions/Hamtaro/verb/Lazy
usr:verbs += /mob/emotions/Hamtaro/verb/AFK
usr:verbs += /mob/emotions/Hamtaro/verb/Anime_Fall
usr:verbs += /mob/emotions/Hamtaro/verb/Angry
usr.icon = 'Ham test.dmi'
usr.iicon = 'Ham test.dmi'
usr.iiiicon = "Ham test.dmi"
if(usr.iiiicon == "Sabu.dmi")
verbs += typesof(/mob/emotions/Hamtaro/verb)
usr.icon = 'Sabu.dmi'
usr.iicon = 'Sabu.dmi'
usr.iiiicon = "Sabu.dmi"
usr:verbs -= /mob/emotions/Hamtaro/verb/Japanese_Pervert
usr:verbs -= /mob/emotions/Hamtaro/verb/Breakdance
usr:verbs -= /mob/emotions/Hamtaro/verb/Bye_Q
usr:verbs -= /mob/emotions/Hamtaro/verb/Flip
usr:verbs -= /mob/emotions/Hamtaro/verb/Kawaii
usr:verbs -= /mob/emotions/Hamtaro/verb/Kush2
usr:verbs -= /mob/emotions/Hamtaro/verb/Kushi_Kushi
usr:verbs -= /mob/emotions/Hamtaro/verb/No
usr:verbs -= /mob/emotions/Hamtaro/verb/Puffy
usr:verbs -= /mob/emotions/Hamtaro/verb/Sad
usr:verbs -= /mob/emotions/Hamtaro/verb/Shocked
usr:verbs -= /mob/emotions/Hamtaro/verb/Sneeze
usr:verbs -= /mob/emotions/Hamtaro/verb/Yaaa
if(usr.iiiicon=="abuham.dmi")
usr.icon='abuham.dmi'
usr.iicon='abuham.dmi'
usr.iiiicon='abuham.dmi'
usr:verbs += /mob/emotions/Hamtaro/verb/Love
usr:verbs += /mob/emotions/Hamtaro/verb/Sad3
usr:verbs += /mob/emotions/Hamtaro/verb/Sit
usr:verbs += /mob/emotions/Hamtaro/verb/Kawaii
usr:verbs += /mob/emotions/Hamtaro/verb/Blade
usr:verbs += /mob/emotions/Hamtaro/verb/Bada_Bada
usr:verbs += /mob/emotions/Hamtaro/verb/Japanese_Pervert
usr:verbs += /mob/emotions/Hamtaro/verb/Hi
usr:verbs += /mob/emotions/Hamtaro/verb/Kushi_Kushi
verbs += typesof(/mob/emotions/Abu/verb)
if(usr.iiiicon == "Hamtaro.dmi")
verbs += typesof(/mob/emotions/Hamtaro/verb)
usr.icon = 'Hamtaro.dmi'
usr.iicon = 'Hamtaro.dmi'
usr.iiiicon='Hamtaro.dmi'
if(usr.iiiicon=="PinkBijou.dmi")
usr.icon='PinkBijou.dmi'
usr.iicon='PinkBijou.dmi'
verbs += typesof(/mob/emotions/Bijou/verb)
usr:verbs += /mob/emotions/Hamtaro/verb/Sit
usr:verbs += /mob/emotions/Hamtaro/verb/Sad
usr:verbs += /mob/emotions/Hamtaro/verb/Joy
usr:verbs += /mob/emotions/Hamtaro/verb/No
usr:verbs += /mob/emotions/Hamtaro/verb/Love
usr:verbs += /mob/emotions/Hamtaro/verb/Joy
usr:verbs += /mob/emotions/Hamtaro/verb/Yaaa
usr:verbs += /mob/emotions/Hamtaro/verb/Hablah
usr:verbs += /mob/emotions/Hamtaro/verb/Lazy
usr:verbs += /mob/emotions/Hamtaro/verb/Kush2
usr:verbs += /mob/emotions/Hamtaro/verb/Bada_Bada
usr:verbs += /mob/emotions/Hamtaro/verb/Cuddle
usr:verbs += /mob/emotions/Hamtaro/verb/Pray
usr:verbs += /mob/emotions/Hamtaro/verb/Anime_Fall
usr:verbs += /mob/emotions/Hamtaro/verb/Haha
usr:verbs += /mob/emotions/Hamtaro/verb/Ball
usr:verbs += /mob/emotions/Hamtaro/verb/Angry
usr:verbs += /mob/emotions/Hamtaro/verb/Shocked
usr:verbs += /mob/emotions/Hamtaro/verb/Scared
usr:verbs += /mob/emotions/Hamtaro/verb/Stance
usr:verbs += /mob/emotions/Hamtaro/verb/Diggi_Duggi
usr:verbs += /mob/emotions/Hamtaro/verb/AFK
usr:verbs += /mob/emotions/Hamtaro/verb/Drum
usr:verbs += /mob/emotions/Hamtaro/verb/Drat
usr:verbs += /mob/emotions/Hamtaro/verb/Book
usr:verbs += /mob/emotions/Other/verb/Blush
usr.iiiicon='PinkBijou.dmi'
if(usr.iiiicon=="Oxnard.dmi")
usr.icon='Oxnard.dmi'
usr.iicon='Oxnard.dmi'
verbs += typesof(/mob/emotions/Oxnard/verb)
usr:verbs += /mob/emotions/Other/verb/Whine
usr:verbs += /mob/emotions/Hamtaro/verb/Shocked
usr:verbs += /mob/emotions/Hamtaro/verb/Ball
usr.iiiicon='Oxnard.dmi'
if(usr.iiiicon=="Panda.dmi")
usr.icon='Panda.dmi'
usr.iicon='Panda.dmi'
verbs += typesof(/mob/emotions/Panda/verb)
usr:verbs += /mob/emotions/Hamtaro/verb/Angry
usr:verbs += /mob/emotions/Hamtaro/verb/Japanese_Pervert
usr:verbs += /mob/emotions/Hamtaro/verb/Ball
usr.iiiicon='Panda.dmi'
usr << "<B><FONT COLOR= #33CCFF>Panda was made by ~I~S~N~U~ (and Caity)"
if(usr.icon=="Maxwell4.dmi")
usr.icon='Maxwell4.dmi'
usr.iicon='Maxwell4.dmi'
usr.iiiicon = "Maxwell4.dmi"
verbs += typesof(/mob/emotions/Maxwell/verb)
verbs += typesof(/mob/emotions/Hamtaro/verb)
if(usr.iiiicon=="Stan2.dmi")
usr.icon='Stan2.dmi'
usr.iicon='Stan2.dmi'
verbs += typesof(/mob/emotions/Hamtaro/verb)
usr:verbs -= /mob/emotions/Hamtaro/verb/Kushi_Kushi
usr:verbs -= /mob/emotions/Hamtaro/verb/Idea
usr:verbs -= /mob/emotions/Hamtaro/verb/Ball
usr:verbs -= /mob/emotions/Hamtaro/verb/Bomb
usr:verbs -= /mob/emotions/Hamtaro/verb/Sad2
usr:verbs += /mob/emotions/Other/verb/Maracas
usr << "<B><FONT COLOR= #33CCFF>Stan was made by Mashed_Taters AKA Stan (and Abu)"
usr.iiiicon='Stan2.dmi'
if(usr.iiiicon=="Sanddy.dmi")
usr.icon='Sanddy.dmi'
usr.iicon='Sanddy.dmi'
verbs += typesof(/mob/emotions/Hamtaro/verb)
usr:verbs -= /mob/emotions/Hamtaro/verb/Bomb
usr:verbs -= /mob/emotions/Hamtaro/verb/Bye_Q
usr:verbs -= /mob/emotions/Hamtaro/verb/Hiff_Hiff
usr:verbs -= /mob/emotions/Hamtaro/verb/Idea
usr:verbs -= /mob/emotions/Hamtaro/verb/Sad2
usr:verbs -= /mob/emotions/Hamtaro/verb/Kushi_Kushi
usr.iiiicon='Sanddy.dmi'
if(usr.iiiicon=="Shadows.dmi")
usr.icon='Shadows.dmi'
usr.iicon='Shadows.dmi'
verbs += typesof(/mob/emotions/Hamtaro/verb)
verbs += typesof(/mob/emotions/Pashmina/verb)
verbs += typesof(/mob/emotions/Other/verb)
usr.iiiicon='Shadows.dmi'
if(usr.iiiicon == "Pashmina.dmi")
usr.icon = 'Pashmina.dmi'
usr.iicon = 'Pashmina.dmi'
verbs += typesof(/mob/emotions/Pashmina/verb)
usr:verbs += /mob/emotions/Hamtaro/verb/Ball
usr.iiiicon='Pashmina.dmi'
if(usr.iiiicon=="GOATSREVIL.dmi")
usr.icon='GOATSREVIL.dmi'
usr.iicon='GOATSREVIL.dmi'
verbs += typesof(/mob/emotions/Boss/verb)
usr:verbs += /mob/emotions/Hamtaro/verb/Ball
usr.iiiicon='GOATSREVIL.dmi'
if(usr.iiiicon=="Cappy.dmi")
usr.icon='Cappy.dmi'
usr.iicon='Cappy.dmi'
usr:verbs += /mob/emotions/Other/verb/Whine
usr:verbs += /mob/emotions/Hamtaro/verb/Ball
usr.iiiicon='Cappy.dmi'
if(usr.iiiicon=="Edwardo.dmi")
usr.icon='Edwardo.dmi'
usr.iicon='Edwardo.dmi'
usr:verbs += /mob/emotions/Hamtaro/verb/Hablah
usr:verbs += /mob/emotions/Hamtaro/verb/Diggi_Duggi
usr:verbs += /mob/emotions/Hamtaro/verb/Pray
usr:verbs += /mob/emotions/Hamtaro/verb/Puffy
usr.iiiicon='Edwardo.dmi'
if(usr.iiiicon=="Dexter.dmi")
usr.icon='Dexter.dmi'
usr.iicon='Dexter.dmi'
if(usr.iiiicon=="Howdy.dmi")
usr.icon='Howdy.dmi'
usr.iicon='Howdy.dmi'
usr << sound(null)
usr << sound('lithium.mid',repeat=1)
world << "<B><FONT COLOR=GREEN>[usr.key] enters the Ham-Ham Clubhouse!"
/*usr:verbs += /mob/commands/verb/Say
usr:verbs += /mob/commands/verb/Emotion
usr:verbs += /mob/commands/verb/Play_Music
usr:verbs += /mob/commands/verb/Who
usr:verbs += /mob/commands/verb/Picture
usr:verbs += /mob/commands/verb/Stop_Music
usr:verbs += /mob/commands/verb/Make_Ham
usr:verbs += /mob/commands/verb/Cancel_Ham
usr:verbs += /mob/commands/verb/Write_in_Paper
usr:verbs += /mob/commands/verb/Challenge
usr:verbs += /mob/commands/verb/Race
usr:verbs += /mob/commands/verb/Save
usr:verbs += /mob/commands/verb/Customize
usr:verbs += /mob/commands/verb/Take_Off_Everything*/

if(usr.host==0 && usr.key != "BreakmanDX")
usr.verbs += typesof(/mob/commands/verb)
usr.verbs -= /mob/commands/verb/Ban_User
usr.verbs -= /mob/commands/verb/Enable_Ban
usr.verbs -= /mob/commands/verb/Disable_Ban
usr.verbs -= /mob/commands/verb/Destroy
usr.verbs -= /mob/commands/verb/Boot
usr.verbs -= /mob/commands/verb/Reboot
usr.verbs -= /mob/commands/verb/Edit
usr.verbs -= /mob/commands/verb/Enable_Reboot
usr.verbs -= /mob/commands/verb/Disable_Reboot
usr.verbs -= /mob/commands/verb/Ban_User
usr.verbs -= /mob/commands/verb/Boot_All
usr.verbs -= /mob/commands/verb/Transfer_All
usr.verbs -= /mob/commands/verb/Give_Transfer
usr.verbs -= /mob/commands/verb/Transfer_File
usr.verbs -= /mob/commands/verb/Announce
usr.verbs -= /mob/commands/verb/Super_GM
usr:verbs -= /mob/commands/verb/Shadow
usr:verbs -= /mob/commands/verb/Hyper
usr:verbs -= /mob/commands/verb/Lvl
usr:verbs -= /mob/commands/verb/Turn_Into_Simbu
usr:verbs -= /mob/commands/verb/Turn_Into_Simba
usr:verbs -= /mob/commands/verb/GM_All
usr:verbs -= /mob/commands/verb/Make_GM
usr:verbs -= /mob/commands/verb/Heal
usr:verbs -= /mob/commands/verb/Restore_All
usr:verbs -= /mob/commands/verb/R_Toilet_Trained
usr:verbs -= /mob/commands/verb/R_Zipper_Locked
usr:verbs -= /mob/commands/verb/Repop
else
usr.verbs += typesof(/mob/commands/verb)
usr.StatCalculation()
usr.music()
usr.events()
usr.MedalCheck()
if(usr.update != 2)
usr << "Save files from old versions not compatable with this one."
sleep(1)
del(usr)
else
usr << "<B>You don't have a savefile."
usr.move = 1
Look up Write() and Read(). They save pretty much every non-tmp variable, (except for location).
It will give popups if it's on ultrasafe mode. It will auto go on ultrasafe mode if the dmb has a different name than the folder it is placed in. To solve the problem, name the folder the same as the dmb.
Ok, cool, now I just have it use Write and Read besides the move variables and I renamed my folder to the dmb's name.

But now when I used Save, it still freezes and says that it has trouble saving the icon variable as 'Hamtaro.dmi' (the icon name) and yeah @_@

and now I tried running it again and hitting Save and keep getting:

proc name: Save (/mob/commands/verb/Save)
usr: Abu the Ham-Ham (/mob)
src: Abu the Ham-Ham (/mob)
call stack:
Abu the Ham-Ham (/mob): Save()


Edit: Okay, I did nothing at all, but suddenly it works fine @_@... Thanks :3.
In response to MartialArtistAbu
ook it kept working for awhile with just me perfectly,

but after hosting the game again with a bunch of people joining, save and load stopped working after some minutes passed and I kept getting these errors but for each of the players every time the game auto-saved every 50 seconds for each player:

"proc name: Save (/mob/commands/verb/Save)
usr: Abu the Ham-Ham (/mob)
src: Abu the Ham-Ham (/mob)
call stack:
Abu the Ham-Ham (/mob): Save()"

Anyone know what's wrong? =3

mob/proc
Savee()
usr.update = 115
var/savefile/save
save = new ("Save Files/[usr:ckey]")
save["x"] << usr:x
save["y"] << usr:y
save["z"] << usr:z
Write(save)
Loadd()
var/savefile/load = new ("Save Files/[usr:ckey]")
usr.Read(load)
load["x"] >> usr:x
load["y"] >> usr:y
load["z"] >> usr:z
usr.canthit = 0
mob/proc/music()
if(usr.z > 0 && usr.z < 12)
usr.Savee()
spawn(500)
music()
In response to MartialArtistAbu
You're giving us no error whatsoever. You simply show us the proc it seems to be about. My guess would be that you changed a proc definition's path, without changing the references to it elsewhere.
In response to Spunky_Girl
Spunky_Girl wrote:
You're giving us no error whatsoever. You simply show us the proc it seems to be about.

Well, that's the error message I get in the game @_@

"proc name: Save (/mob/commands/verb/Save)
usr: Abu the Ham-Ham (/mob)
src: Abu the Ham-Ham (/mob)
call stack:
Abu the Ham-Ham (/mob): Save()"

that. And it's actually a verb the error is referring to, which plays a proc called Savee with an extra e.

This is it in case it's useful to anyone:

        Save()
set category="Chat"
usr.Savee()
usr << "Saved."


And then they can't load at all cuz I get more errors when they load but I don't have those copied down ^^;. (They were even simpler sounding than that one, though.)

Spunky_Girl wrote:
My guess would be that you changed a proc definition's path, without changing the references to it elsewhere.

Uhhh.. I don't think so.. @_@.

I still need this fixed though, I don't understand it myself and it seems to only happen when other players are in the game for awhile only, I think =(.
In response to MartialArtistAbu
In the proc, use src, not usr (first of all).
Also, never use the colon ( : ) unless you know how. You should always use the period ( . ).

Your saving proc should be nothing more than a sanity check and then the Write() call. And then the same principle for your Loadd() proc.

mob/proc/Savee()
var/index = "Savefiles/[src.ckey].sav"
if(fexists(index)) fdel(index)
var/savefile/s = new(index)
src.Write(s)

mob/Write(savefile/s)
s["loc_x"] << src.x
s["loc_y"] << src.y
s["loc_z"] << src.z
return ..()

mob/proc/Loadd()
var/index = "Savefiles/[src.ckey].sav"
if(fexists(index))
var/savefile/s = new(index)
src.Read(s)

mob/Read(savefile/s)
if(!src.Move(locate(s["loc_x"],s["loc_y"],s["loc_z"])))
src.loc = locate(1,1,1) //whatever you want it to locate to in case of failure
return ..()


mob/player/verb/Save()
src.Savee()
src<<"Game saved!"

mob/player/verb/Load()
src.Loadd()
src<<"Game loaded!"


P.S.
If you want a certain variable to not save, just define it as a tmp var like so.
var/tmp/canhit = FALSE //or 0

...because what that does, is it prevents the var from being saved automatically by the Write() proc, causing the variable to be "reset" every time the parent object is created (whether it be the world, mob, obj, etc).
In response to Spunky_Girl
Er wow thank you, I mean you even almost completly re-wrote all of my stuff for me and everything, that's really nice of you.

Okay, thanks for all the advice, I'm just a noob right now and keep making unclean unneccesary code a lot of the time cuz of it ^^;.

If I ever run into problems again, I'll post again :3.