ID:144946
 
Code:
Hud/Screen/proc
OpenStat()
src.icon_state="Opened Stats"
var/mob/M=usr
M.panel="Stats"
M.client.screen+=new/Hud/Panel/Lvl
M.client.screen+=new/Hud/Panel/Exp
M.client.screen+=new/Hud/Panel/Gold
M.client.screen+=new/Hud/Panel/Health
M.client.screen+=new/Hud/Panel/MaxHealth
M.client.screen+=new/Hud/Panel/Quests
M.client.screen+=new/Hud/Panel/Magic
M.client.screen+=new/Hud/Panel/MaxMagic
M.client.screen+=new/Hud/Panel/Status
OpenEquip()
src.icon_state="Opened Equip"
var/mob/M=usr
M.panel="Equip"
M.client.screen+=new/Hud/Panel/EmptyE
M.client.screen+=new/Hud/Panel/Helmet
M.client.screen+=new/Hud/Panel/EmptyE2
M.client.screen+=new/Hud/Panel/Sword
M.client.screen+=new/Hud/Panel/Chest
M.client.screen+=new/Hud/Panel/Shield
M.client.screen+=new/Hud/Panel/EmptyE3
M.client.screen+=new/Hud/Panel/Boots
M.client.screen+=new/Hud/Panel/EmptyE4
OpenInventory()
src.icon_state="Opened Inventory"
var/mob/M=usr
M.panel="Inventory"
CloseStat()
var/mob/M=usr
M.panel=""
CloseEquip()
src.icon_state="Open Equip"
var/mob/M=usr
M.panel=""
Delete(/Hud/Panel/EmptyE,M)
Delete(/Hud/Panel/Helmet,M)
Delete(/Hud/Panel/EmptyE2,M)
Delete(/Hud/Panel/Sword,M)
Delete(/Hud/Panel/Chest,M)
Delete(/Hud/Panel/Shield,M)
Delete(/Hud/Panel/EmptyE3,M)
Delete(/Hud/Panel/Boots,M)
Delete(/Hud/Panel/EmptyE4,M)
CloseInventory()
var/mob/M=usr
M.panel=""
Delete(var/Hud/Panel/H)
if(H in usr.client.screen) del H


Problem description:

None of the equipment hud icons are deleted...
and if i don't say if(H in usr.client.screen) it gives me the runtime error bad del

and for the people that will yell at me

the usr is in the proc cause the proc is called from a Click()!
var/mob/M=usr

Noputusrinprocsevenunderdisguises.

Besides that, for() !
for(var/obj/hud/h in src.client.screen)del(h)
In response to Mysame
Mysame wrote:
var/mob/M=usr

Noputusrinprocsevenunderdisguises.

How do i not use usr then?

and thnx anyways...it worked
In response to Shlaklava
You don't use usr by using arguments instead. Usr is not what you think it is.