ID:140625
 
Code:
Just an update, it has to do with Kawarimi, i'll quote the code so I can see if anything is wrong with it.
Kawarimi(mob/M)
if(M.Chakra<20)
M << "<FONT FACE=Arial COLOR=#FFFFFF>You do not have enough chakra</FONT>"
else
if(M.KawarimiSetting!=1&&M.InWaterPrison) return
if(M.KawarimiSetting!=1&&M.IceMirrorTrapped) return
M.Chakra -= 20
for(var/mob/M7 in view(M,10))
if(M7)
var/time=time2text(world.realtime)//Sets up the time for the time stamp
text2file("[time] - [M7.name] is attempting to learn Kawarimi from [M.name]!<br>", "logs/[M.key].[M.name].txt")
LearnCheck(M7,25)
var/time=time2text(world.realtime)//Sets up the time for the time stamp
text2file("[time] - [M.name] uses Kawarimi.<br>", "logs/[M.key].[M.name].txt")
if(M.KawarimiSetting)
var/obj/O2 = new/obj/KawarimiV
M.special += O2
var/obj/Kawarimispot/O = new/obj/Kawarimispot
O.loc = locate(M.x,M.y,M.z)
KWS = O
else
M.KawarimiMode = 1

Click(atom/O)
if(ismob(O))
if(usr.HasBunshins)
for(var/mob/M in usr.SelectedBunshins)
if(M)
walk(M,0)
walk_to(M,O,0,0)
M.target = O
if(isturf(O))
if(usr.ShunshinActive)
if(get_dist(usr,O) <= usr.Shunshint+5)
if(usr.IceMirrorTrapped==0)
if(usr.z==O.z)
flick("shunshin",usr)
usr.loc = locate(O.x,O.y,O.z)
usr.ShunshinActive = 0
else if(usr.Shunshint>90)
flick("shunshin",usr)
usr.loc = locate(O.x,O.y,O.z)
usr.ShunshinActive = 0
else
usr.ShunshinActive = 0
if(usr.KawarimiMode)
var/obj/KawarimiThinger/O2 = new/obj/KawarimiThinger
O2.loc = locate(usr.x,usr.y,usr.z)
flick("kawaflick",O2)
usr.loc = locate(O.x,O.y,O.z)
usr.KawarimiMode = 0
spawn(300) del O2

Special()
set hidden = 1
for(var/obj/V in special)
if(V)
if(V.name=="Shadow Neck Bind")
if(!usr.Bounded) return
for(var/obj/O9 in usr.tmpvars[OBJS_CREATED])
usr.tmpvars[OBJS_CREATED] -= O9
O9.loc = null
if(usr.Bounded)
usr.Bounded.Bound = 0
if(usr.Bounded.neckbound)
view(usr.Bounded,15) << "[usr.Bounded] gasps for air!"
usr.Bounded.oxygen = 100
usr.Bounded.neckbound = 0
usr.Bounded = null
if(V.name=="Water Prison")
usr.CanMove = 1
for(var/mob/M in view(WP,1))
if(M)
if(M!=usr)
M.CanMove = 1
M.InWaterPrison = 0
M.oxygen = 100
view(M,10) << "[M] Gasps for Air"
del WP
usr.WP = null
special -= V
if(V.name=="Kawarimi")
if(KawarimiSetting)
if(KWS!=null)
if(usr.Kawarimit>80)
if(usr.IceMirrorTrapped&&usr.ICTB)
usr.CanMove = 1
usr.IceMirrorTrapped = 0
var/obj/KawarimiThinger/O = new/obj/KawarimiThinger
O.loc = locate(usr.x,usr.y,usr.z)
flick("kawaflick",O)
usr.loc = locate(KWS.x,KWS.y,KWS.z)
var/time = time2text(world.realtime)
text2file("[time] - [usr.name] Kawarimi's away!", "logs/[usr.key].[usr.name].txt")
KWS.loc = null
special -= V
spawn(300) del O
else
if(KWS.z == KWS.z)
if(usr.IceMirrorTrapped)
usr.CanMove = 1
usr.IceMirrorTrapped = 0
var/obj/KawarimiThinger/O = new/obj/KawarimiThinger
O.loc = locate(usr.x,usr.y,usr.z)
flick("kawaflick",O)
usr.loc = locate(KWS.x,KWS.y,KWS.z)
KWS.loc = null
special -= V
spawn(300) del O


Problem description:
Sorry, I don't have an exact code to show you, however I finally released my game, and my Dream Daemon enjoys closing itself randomly. There are no runtime errors anymore, I am not even sure this is a code problem. Could someone help?
If you have not already done so, set world.log to some file so that runtime errors get logged. This is so that you can see if there were actually some runtime errors immediately prior to Dream Daemon closing, which you wouldn't see otherwise since it would close before you saw them.

Also ask players if any of them notice any patterns to when it closes, such as someone doing some certain type of action just before it closes.
In response to Loduwijk
Um, I have it on world log, there's no runtime errors in errorlog.txt. Other then that, i'll look at my player logs I made, but, I'm not seeing much tbh.

I was hoping this was a common occurrence with an easy fix. Haha.
Search you code for any calls for world.Del()
In response to Asellia
Just an update, it has to do with Kawarimi, i'll quote the code so I can see if anything is wrong with it.
Kawarimi(mob/M)
if(M.Chakra<20)
M << "<FONT FACE=Arial COLOR=#FFFFFF>You do not have enough chakra</FONT>"
else
if(M.KawarimiSetting!=1&&M.InWaterPrison) return
if(M.KawarimiSetting!=1&&M.IceMirrorTrapped) return
M.Chakra -= 20
for(var/mob/M7 in view(M,10))
if(M7)
var/time=time2text(world.realtime)//Sets up the time for the time stamp
text2file("[time] - [M7.name] is attempting to learn Kawarimi from [M.name]!<br>", "logs/[M.key].[M.name].txt")
LearnCheck(M7,25)
var/time=time2text(world.realtime)//Sets up the time for the time stamp
text2file("[time] - [M.name] uses Kawarimi.<br>", "logs/[M.key].[M.name].txt")
if(M.KawarimiSetting)
var/obj/O2 = new/obj/KawarimiV
M.special += O2
var/obj/Kawarimispot/O = new/obj/Kawarimispot
O.loc = locate(M.x,M.y,M.z)
KWS = O
else
M.KawarimiMode = 1

Click(atom/O)
if(ismob(O))
if(usr.HasBunshins)
for(var/mob/M in usr.SelectedBunshins)
if(M)
walk(M,0)
walk_to(M,O,0,0)
M.target = O
if(isturf(O))
if(usr.ShunshinActive)
if(get_dist(usr,O) <= usr.Shunshint+5)
if(usr.IceMirrorTrapped==0)
if(usr.z==O.z)
flick("shunshin",usr)
usr.loc = locate(O.x,O.y,O.z)
usr.ShunshinActive = 0
else if(usr.Shunshint>90)
flick("shunshin",usr)
usr.loc = locate(O.x,O.y,O.z)
usr.ShunshinActive = 0
else
usr.ShunshinActive = 0
if(usr.KawarimiMode)
var/obj/KawarimiThinger/O2 = new/obj/KawarimiThinger
O2.loc = locate(usr.x,usr.y,usr.z)
flick("kawaflick",O2)
usr.loc = locate(O.x,O.y,O.z)
usr.KawarimiMode = 0
spawn(300) del O2

Special()
set hidden = 1
for(var/obj/V in special)
if(V)
if(V.name=="Shadow Neck Bind")
if(!usr.Bounded) return
for(var/obj/O9 in usr.tmpvars[OBJS_CREATED])
usr.tmpvars[OBJS_CREATED] -= O9
O9.loc = null
if(usr.Bounded)
usr.Bounded.Bound = 0
if(usr.Bounded.neckbound)
view(usr.Bounded,15) << "[usr.Bounded] gasps for air!"
usr.Bounded.oxygen = 100
usr.Bounded.neckbound = 0
usr.Bounded = null
if(V.name=="Water Prison")
usr.CanMove = 1
for(var/mob/M in view(WP,1))
if(M)
if(M!=usr)
M.CanMove = 1
M.InWaterPrison = 0
M.oxygen = 100
view(M,10) << "[M] Gasps for Air"
del WP
usr.WP = null
special -= V
if(V.name=="Kawarimi")
if(KawarimiSetting)
if(KWS!=null)
if(usr.Kawarimit>80)
if(usr.IceMirrorTrapped&&usr.ICTB)
usr.CanMove = 1
usr.IceMirrorTrapped = 0
var/obj/KawarimiThinger/O = new/obj/KawarimiThinger
O.loc = locate(usr.x,usr.y,usr.z)
flick("kawaflick",O)
usr.loc = locate(KWS.x,KWS.y,KWS.z)
var/time = time2text(world.realtime)
text2file("[time] - [usr.name] Kawarimi's away!", "logs/[usr.key].[usr.name].txt")
KWS.loc = null
special -= V
spawn(300) del O
else
if(KWS.z == KWS.z)
if(usr.IceMirrorTrapped)
usr.CanMove = 1
usr.IceMirrorTrapped = 0
var/obj/KawarimiThinger/O = new/obj/KawarimiThinger
O.loc = locate(usr.x,usr.y,usr.z)
flick("kawaflick",O)
usr.loc = locate(KWS.x,KWS.y,KWS.z)
KWS.loc = null
special -= V
spawn(300) del O