OpenDream
OpenDream copied to clipboard
"Cannot peek empty loop stack" in proc definition
When attempting to compile /vg/station, this error occurs twice:
Error at code\datums\sun.dm:74:7: Cannot peek empty loop stack
Error at code\datums\sun.dm:74:7: Cannot peek empty loop stack
at the following location:
74 /datum/sun/proc/occlusion(const/obj/machinery/power/solar/panel/S)
75 var/ax = S.x //Start at the solar panel.
76 var/ay = S.y
77 var/i
78 var/turf/T
79
80 for(i = 1 to 256) //No tiles shall stay unchecked. Since the loop stops when it hit level boundaries or opaque blocks, this can't cause too much problems
81 ax += dx //Do step
82 ay += dy
83
84 T = locate(round(ax, 0.5), round(ay, 0.5), S.z)
85
86 if(isnull(T))
87 warning("Occlusion's locate returned null. [S] at ([S?.x],[S?.y],[S?.z]). ax: [ax], ay: [ay], dx: [dx], dy: [dy]")
88 break
89 if(T.x == 1 || T.x == world.maxx || T.y == 1 || T.y == world.maxy) // Not obscured if we reach the edge.
90 break
91 if(T.opacity) //Opaque objects block light.
92 S.obscured = 1
93 return
94
95 S.obscured = 0 //If hit the edge or stepped 20 times, not obscured.
96 S.update_solar_exposure()
I thought it might be related to the fact that the arg is a const
, but it still occurs even if it's changed to var
.
It seems that this has been fixed.