ID:138930
 
Code:I get some retarded error when I load the game and it lags the whole entire server when someone loads their file

This is the whole save folder
mob
proc
Create()
usr<<sound()
usr.loc=locate(14,248,10)
usr<<sound('Intro.MIDI' ,1)
alert(usr,"Hello, welcome to the world of Pokemon!")
alert(usr,"My name is Professor Oak.")
alert(usr,"I am a Pokemon professor, I study Pokemon.")
alert(usr,"This Pokemon next to me is, Pikachu.")
alert(usr,"Now, what is your name?")
usr.name = input("What would you like your name to be?","Name","[usr.name]")
alert(usr,"[usr],huh? Thats a nice name.")
alert(usr,"Why dont you tell me a little bit about yourself, [usr.name]?")
switch(input("Are you a Boy or a Girl?") in list ("Boy","Girl"))
if("Boy")
alert(usr,"Now, would you like to take the tutorial on how to play? I highly suggest you do!","Prof. Oak","Yes")
alert(usr,"Okay lets get started!")
usr.loc=locate(/turf/Tutorial/)
usr<<sound()
usr<<sound('Follow.mid', 1)
usr.icon='HS Trainers.dmi'
usr.icon_state="Naked"
if("Girl")
alert(usr,"Now, would you like to take the tutorial on how to play? I highly suggest you do!","Prof. Oak","Yes")
alert(usr,"Okay lets get started!")
usr.loc=locate(/turf/Tutorial/)
usr<<sound()
usr<<sound('Follow.mid', 1)
usr.icon='HS Trainers.dmi'
usr.icon_state="Naked"

mob/Write(var/savefile/F)
..()
F["x"] << x
F["y"] << y
F["z"] << z
mob/Read(var/savefile/F)
..()
var/turf/T = locate(F["x"], F["y"], F["z"])
if(T)
loc = T

client/proc
Savee()
if(src.mob.cansave)
fdel("Players/[src.mob.ckey].save")
var/savefile/F = new("Players/[src.mob.ckey].save")
src.mob.V = src.mob.verbs
F["mob"] << src.mob
F["x"] << src.mob.x
F["y"] << src.mob.y
F["z"] << src.mob.z
src.mob << "<font color=red>Your game has been saved!"
Loadd()
if(fexists("Players/[src.mob.ckey].save"))
var/savefile/F = new("Players/[src.mob.ckey].save")
var/mob/newmob = new()
F["mob"] >> newmob
var/turf/T = locate(F["x"], F["y"], F["z"])
if(T)
newmob.loc = T
for(var/stuff in newmob.V)
newmob.verbs += stuff
newmob.client = src.mob
src<<sound()
src<<"<b>File loaded!"
world<<"<font color=green><b>Login Info:<br>[src.mob] has logged in!"
src<<"<font color=#1589FF>Please be sure to check out the Website/Forums! http://pokemonfallensouls.webs.com/ "
alert(src,"Welcome to Pokemon Fallen Souls!")
src.mob.cansave=1
else
src.mob << "You dont have a save file!"
mob
verb
Save()
client.Savee()


Problem description:
runtime error: Cannot write to atom.verbs.
proc name: Login (/mob/Login)
usr: Immy (/mob)
src: Immy (/mob)
call stack:
Immy (/mob): Login()
Immy (/mob): Read(Players/imzco.save (/savefile))
Imzco (/client): Loadd()
Load (/obj/Load): Click(the turf (235,242,10) (/turf), "General.map1", "icon-x=6;icon-y=27;left=1;scre...")

Something like that happens to me when I run a game directly from the source(Ctrl+R) but never when I host it.
In response to Dr.DraX
It happens when I host and when i run the game offline.
The problem is the way you're saving and loading verbs, by the way.

You are repeating the following:

mob/Write(var/savefile/F)
..()
F["x"] << x
F["y"] << y
F["z"] << z

client/proc
Savee()
if(src.mob.cansave)
F["mob"] << src.mob
F["x"] << src.mob.x
F["y"] << src.mob.y
F["z"] << src.mob.z


The saving of x, y and z is only needed in mob/Write(). (You do not have to delete the savefile then resave it, by the way, it overrides itself. )

            var/mob/newmob = new()
F["mob"] >> newmob
var/turf/T = locate(F["x"], F["y"], F["z"])
if(T)
newmob.loc = T
for(var/stuff in newmob.V)
newmob.verbs += stuff
newmob.client = src.mob


No offense, this is where you have completely blown me away with your creativity.

You do not need to be creating a new mob because a new mob is already being created when you load your savefile. (Probably stated this wrong.)

The repetition continues- the locating of your mob is also being done in Read(). It does not need to be done in Load().

            newmob.client = src.mob


You have created a mob and you are modifying the client of said mob to your mob. This is utterly not needed.

Do not let me dread, read over this: [link]