runtime error: wrong type of value for list
proc name: Hud (/mob/proc/Hud)
source file: Procs.dm,100
usr: Motre (/mob/person)
src: Motre (/mob/person)
call stack:
Motre (/mob/person): Hud()
Motre (/mob/person): Toggle HUD()
-----------------------------------------
verb
Toggle_HUD()
if(usr.ClosedHud==0)
for(var/obj/HUD/C in usr.client.screen)
del(C)
usr.ClosedHud=1
return
if(usr.ClosedHud==1)
src.Hud()
usr.ClosedHud=0
return
Problem description:
Im made a verb for toggling the usr hud but when i click it the first time it goes away YAY like its sapose to but if i click it to come back i get that warning...
Also, this has no bearing on the error message, but I just have to compulsively improve your verb. Sorry. =)
Using an if...else instead of two ifs is much nicer style, and just testing (usr.ClosedHud) instead of (usr.ClosedHud==1) is more robust. Plus, because of the if...else, you can now get rid of those return statements and just let the verb naturally return when it reaches its end, which makes the code shorter and (IMO) slightly more readable.