ID:261874
 
I need help A.S.A.P.
My game crashes/hangs upon a reboot.
If one wrong move happens, and a reboot occurs, some players may lose their files, and some things may be deleted! I may not let this happen!

world
name = "Calypso"
hub = "PBYOND.Calypso"
view = 7
loop_checks = 0
New()
..()
LoadObjects()
rooms += new /room(DEFAULT_ROOM,"")
rooms += new /room(DEFAULT_KICK_ROOM,"")
var
f
newN=2
lastN=1
rname
rpass
radmin
f= file2text("RROOMS.ini")
while (!(newN >= lentext(f)))
//ROOM NAME
newN=findtext(f,"\n",lastN)
rname=copytext(f,lastN,newN)
lastN=newN+1
//ROOM PASS
newN=findtext(f,"\n",lastN)
rpass=copytext(f,lastN,newN)
lastN=newN+1
//ROOM ADMIN
newN=findtext(f,"\n",lastN)
radmin=copytext(f,lastN,newN)
//CRASH("\nNAME:[rname]\nPASS:[rpass]\nMAKER:[radmin]")
rooms += new /room(rname,rpass,1,radmin)
lastN=newN+1
var/savefile/G = new("world/banks.sav")
G["stuff"] >> accounts
if(accounts == null)
accounts = list()
var/savefile/F = new ("s_admin.sav")

F["banned"] >> banned //load banned list
if(isnull(banned)) //if first time starting
banned = new /list //initialise the list

F["GMs"] >> GMs //load the GM list
if(isnull(GMs)) //if this is the first time starting up
GMs = new /list //initialise.
F["Admins"] >> Admins //load the Admin list
if(isnull(Admins)) //if this is the first time starting up
Admins = new /list //initialise.

F["completelist"] >> completelist //load the player history list
if(isnull(completelist)) //if this is the first time starting up
completelist = new /list //initialise.
Del()
..()
SaveObjects()
var/savefile/G = new("world/banks.sav")
G["stuff"] << accounts
var/savefile/F = new ("s_admin.sav")
F["GMs"] << GMs //save the GM list
F["completelist"] << completelist //save the player history list
F["banned"] << banned //save the banned list
world.log << "Instance closed at approx. [ReportDate(world.realtime)]."
Reboot()
// LoadObjects()
var/savefile/F = new("world/banks.sav")
F["stuff"] << accounts
var/savefile/G = new ("s_admin.sav")
G["GMs"] << GMs //save the GM list
G["completelist"] << completelist //save the player history list
G["banned"] << banned //save the banned list
world.log << "Instance rebooted at approx. [ReportDate(world.realtime)]."
..()


This is my world code. My universal (and only) one.
Please tell me what can cause Dream Seeker (or Daemon) to crash all of the sudden.

Also, my temporary host's Dream Daemon has a TIMER. After the timer reaches a specific time, it stops hosting.

How do I change this time? What's the command?
(Tell me how to change the Dream Daemon time on both Linux SHELL and Windows please)

This was my help posting.
Problem: You're doing stuff in world/New() that needs to be spawned out.

Solution: Use spawn().

Lummox JR
In response to Lummox JR
But how do I do Dream Daemon?
In response to Phoenix Man
I don't know whether Dream Daemon has a command-line option for that, and I'm certain that no piece of code could change it. I suspect it's an OS-controlled thing (most likely under Linux), so unless you have access to that you can't change it.