In response to JohnReaper
mob/Player/Stat()
if(src.islocked == 0)
if(istype(src,/mob/Player))
while(src)
sleep(8)
src.overlays-=src.HealthOverlay
src.overlays-=src.MagicOverlay
src.Bars()
src.ExpBar()
statpanel("Stats")
//the rest


however thats keeping my stat panels from showing up i think its the while(src) is there another way or a step to fix this problem?
In response to XzDoG
Eh? Why are you updating the statpanel like that? Simply use the parent procedure.
In response to JohnReaper
because i want it setup like that, so is there a way to fix my problem or not?
In response to XzDoG
Stat() automatically is called every few ticks. No need for a while().
In response to XzDoG
So if i remove while(src) i should be set?

:EDIT:

mob/Player/Stat()
if(src.islocked == 0)
if(istype(src,/mob/Player))
src.overlays-=src.HealthOverlay
src.overlays-=src.MagicOverlay
src.Bars()
src.ExpBar()
statpanel("Stats")
//the rest


I want it to remove every single layer that is attatched to HealthOverlay + MagicOverlay when its called how can i accomplish this because the way i have it now only removes two.
In response to XzDoG
12:08 AM EST - Bump.
In response to XzDoG
    
mob/proc/Bars()
new /obj/healthbar(src)
for(var/obj/healthbar/H in src.client.screen)
var/Length=30
var/Percent=round(src.Health/src.MaxHealth*Length)
H.icon_state = "[(Percent>Length)?(Length-1):Percent]"



obj
healthbar
icon = 'meter.dmi'
icon_state = "29"
New(client/c)
screen_loc="10,10"
c.screen+=src
world<<"I have been called"



I get this runtime error
runtime error: undefined variable /mob/Player/var/screen
proc name: New (/obj/healthbar/New)
source file: Meter.dm,27
usr: XX (/mob/Choose)
src: the healthbar (/obj/healthbar)
call stack:
the healthbar (/obj/healthbar): New(Player (/mob/Player))
Player (/mob/Player): Bars()
XX (/mob/Choose): NewGame()
XX (/mob/Choose): Login()
runtime error: Cannot read null.screen
proc name: Bars (/mob/proc/Bars)
source file: Meter.dm,15
usr: XX (/mob/Choose)
src: Player (/mob/Player)
call stack:
Player (/mob/Player): Bars()
XX (/mob/Choose): NewGame()
XX (/mob/Choose): Login()

this is line 15
    for(var/obj/healthbar/H in src.client.screen)

and this is line 27
            c.screen+=src


how do i fix this runtime?
In response to XzDoG
Could someone please assist me? I hate bumping/begging but i cannot go forth with my project until this bug is rendered fixed.
In response to XzDoG
Bump.
In response to XzDoG
this is line 15
    for(var/obj/healthbar/H in src.client.screen)

and this is line 27
            c.screen+=src

</dm>
how do i fix this runtime?

lemme take a stab at it.

the first one is because there is no client?
maybe you should add a line before doing the loop
if(!src.client) return

the second one, u didnt show us where u are defining c?
and im guessing you have c as a /mob/Player
define c first
var/client/c
c.screen += src


just a try ;) might be wrong.
In response to Nubstar
Seriously no one can help me? ive been waiting days..
Page: 1 2