ID:143383
 
Code:
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!
remove this from the trashget proc o.O
..()
and put spawn() trashget() instead of just trashget()... in both places
In response to Falacy
Can you tell me what spawn() does?
In response to Hellonagol
same thing as sleep, except it allows the code around it to continue running

ie: in that proc it lets the proc exit out after calling itself again
In response to Falacy
in any way, why do u have a proc like that???
what is the trash thing for and how r u supposed to put stuff into the trashcan?