ID:263001
 
Code:
mob/Login()
if(src.name in BP)
src << "You are banned"
del(src)
icon_state = gender
var/savefile/F = new(key)
Read(F)
LoadObjects()
Move(locate(saved_x,saved_y,saved_z))
Teamcolor = null
JCTF = 0
world << "<font color = blue>[name] has just logged in.</font>"
src << "<font color = green>Welcome to TES, [name]! </font>"
return..()


Problem description:
I know this is a very sloppy and crappy login, and will be changed soon. But I'm wondering if there anything here that is causing the game to freeze?
im not exactly sure it could be one of many many things but to list a few
1. do you have the latest version of byond?
2. What exactly is load objects? sometimes processes like those can take long amounts of time to compute/w/e
3.very unlikely but maybe something went haywire with the save files.
4. many other possibilities but i think i listed some of the most possible
In response to Rky_nick
LoadObjects()

if it loads saved objects yes it will freeze if theres to many just depends
In response to Rky_nick
Rky_nick wrote:
im not exactly sure it could be one of many many things but to list a few
1. do you have the latest version of byond?

Yes

2. What exactly is load objects? sometimes processes like those can take long amounts of time to compute/w/e

It loads the saved object in the players house, but since there is no furniture, theres nothing to load.

3.very unlikely but maybe something went haywire with the save files.

Perhaps, but the only savefile is me really.

4. many other possibilities but i think i listed some of the most possible

If it is the Loadobjects, the here it is. Take a look.

mob
proc/SaveObjects()
var/savefile/F = new ("World.sav")
var/objs[0]
for(var/obj/item/furniture/o in world)
o.saved_x = o.x
o.saved_y = o.y
o.saved_z = o.z
objs.Add(o)
F["Objects"] << objs
proc/LoadObjects(mob/player/M)
var/savefile/F = new ("World.sav")
var/objs[0]
F["Objects"] >> objs
if(length(objs))
for(var/obj/item/furniture/o in objs)
if(o.owner == M)
o.loc = locate(o.saved_x, o.saved_y, o.saved_z)
objs.Remove(o)
objs.Cut()
In response to Pyro_dragons
Try getting rid of Loadobjects in login and see if it continues