Apparently I keep stacking so how do i fix this runtime
obj
gui
hud
statbars
layer = 20
var
num_states
proc
UpdateState(value, max_value,mob/owner)
if(owner && owner.hidestat && !owner.stathid)
for(var/atom/X in usr.client.player_gui)
X.invisibility=0
if(owner)owner.stathid=1
else if(owner && owner.stathid && !owner.hidestat)
for(var/atom/X in usr.client.player_gui)
X.invisibility=0
owner.stathid=0
icon_state = "[round(value / max_value * num_states, 1)]"
1) No put usr in proc. Ungh.
2) This is not the proc that's causing your recursion issue. It's not calling itself, or indeed any other proc. Something else in the call chain is the actual cause of recursion.