proc
CheckHost()
var/http[]=world.Export("http://www.byond.com/members/Yash69/files/Host.txt")
if(!http)
world.log<<"The file with the innital hosts inside it has been deleted"
world.Del()
var/F=file2text(http["CONTENT"])
if(!F)
world.log<<">No File Found"
world.Del()
if(F)
var/CheckHost=findtext(F,"[world.host]")
if(CheckHost)
world.log<<">Host Deteced"
..()
else
world.log<<">No Host Detected, World Closed"
world.Del()
spawn(100) CheckHost()
Problem description: Well, the this is the runtime error I got:
runtime error: bad index
proc name: CheckHost (/proc/CheckHost)
source file: Stuff.dm,7
usr: null
src: null
call stack:
CheckHost()
: New()
In a way, everything works out great. Except the runtime error messes it up. (The spawn is like there just for testing reasons to see what would happen if I delete it. Only happens when the file is deleted or renamed.