obj/HPBar
icon = 'hpbar.dmi'
layer = 5
New(client/C)
screen_loc = "1,1"
icon_state = "30"
C.screen += src
Update(C)
proc/Update(client/C)
var/mob/M
for (M in world)
if (M.key == C.key && M.mhp > 0)
src.icon_state = "[round(((M.hp / M.mhp) * 100) / 3.33333333)]"
spawn (5) Update(C)
obj/MPBar
icon = 'spbar.dmi'
layer = 5
New(client/C)
screen_loc = "10,1"
icon_state = "30"
C.screen += src
Update(C)
proc/Update(client/C)
var/mob/M
for (M in world)
if (M.key == C.key && M.mmp > 0)
src.icon_state = "[round(((M.mp / M.mmp) * 100) / 3.33333333)]"
spawn (5) Update(C)
client/New()
new/obj/HPBar(src)
new/obj/MPBar(src)
..()
Problem description: Whenever I login I get this error
runtime error: Cannot read null.screen
proc name: New (/obj/HPBar/New)
usr: null
src: HPBar (/obj/HPBar)
call stack:
HPBar (/obj/HPBar): New(null)
{Admin} Blue (/mob/Elf): Read(players/l/lordofflames666.sav (/savefile))
LordofFlames666 (/client): base LoadMob("{Admin} Blue")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacterResult("{Admin} Blue")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Topic("menu=choosing_character;choice...", /list (/list))
runtime error: Cannot read null.screen
proc name: New (/obj/MPBar/New)
usr: null
src: MPBar (/obj/MPBar)
call stack:
MPBar (/obj/MPBar): New(null)
{Admin} Blue (/mob/Elf): Read(players/l/lordofflames666.sav (/savefile))
LordofFlames666 (/client): base LoadMob("{Admin} Blue")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacterResult("{Admin} Blue")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Topic("menu=choosing_character;choice...", /list (/list))