proc/get_link()
sleep(10)
world << loc
var/list/other_doors = list()
for(var/obj/game/item/door/other_door in loc:dir2exit(direction)) other_doors += other_door
for(var/i in other_doors) world << i
for(var/obj/game/item/door/D in other_doors)
if(D.direction == OppositeDirection(direction)) linked = D
Problem description:
I'm having a weird runtime where I get the following error:
runtime error: Cannot execute null.dir2exit().
proc name: get link (/obj/game/item/door/proc/get_link)
source file: door.dm,36
usr: null
src: the door (/obj/game/item/door)
call stack:
the door (/obj/game/item/door): get link()
the door (/obj/game/item/door): New()
Apparently the location doesn't exist, yet world << loc outputs the location the door should be in.
Also
proc/get_link()
sleep(10)
world << loc
var/room/room = loc
var/list/other_doors = list()
for(var/obj/game/item/door/other_door in room.dir2exit(direction)) other_doors += other_door
for(var/i in other_doors) world << i
for(var/obj/game/item/door/D in other_doors)
if(D.direction == OppositeDirection(direction)) linked = Dlinked = D
This puts out the same error, I don't know what the issue is.
</<>