obj/proc
trashget()
for(var/obj/Items/I in view(1,src))
I.loc = src
save_trash(src)
sleep(50)
trashget()
..()
obj/building/trash
icon = 'obj.dmi'
icon_state = "trash"
density = 1
verb
Check()
var/trash = src
set src in view(1)
for(var/obj/Items/I in trash)
src.contents += I
icon_state = "trash2"
var/G = input("What do you want to take?","Trash Digging") in src.contents + list("Nothing")
if(G == "Nothing")
icon_state = "trash"
return
else
usr.contents += G
icon_state = "trash"
save_trash()
return
New()
trashget()
Problem description:
Infinite Loop? How can this be fixed?
runtime error: Maximum recursion level reached (perhaps there is an infinite loop)
To avoid this safety check, set world.loop_checks=0.
proc name: save trash (/proc/save_trash)
usr: null
src: null
call stack:
save trash(the trash (/obj/building/trash))
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
...
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): trashget()
the trash (/obj/building/trash): New( (16,26,2) (/turf/path12))
After I get all these runtime errors the trashcan no longer functions!
..()
and put spawn() trashget() instead of just trashget()... in both places