New(atom/M, Label, position, c_var, m_var, Icon, i_size = 30, Dir = EAST, \
update = 1)
/* create a new labeled meter
ARGS:
M atom the meter is tracking
Label label for the meter
position screen_loc for the meter
c_var var used for current value
m_var var used for max value
Icon icon for this meter
if Icon is a list, then this is a multi-tile meter:
Icon[icon] = N where icon is the icon for each
piece and N is the m_max for that piece. if N
is null then use the default m_max.
i_size number of icon states in Icon
Dir direction for multitile meter to expand
Defaults to EAST
update if set, the meter autoupdates
*/
. = ..()
if(!istype(M)) CRASH("Invalid owner.") //line 172
mob/player/Login()
spawn(20)
src.Create_HUD()
mob
proc
Create_HUD()
var/obj/hud/CM = new/obj/hud/Celesmid
var/obj/hud/CM2 = new/obj/hud/Celesmid2
var/obj/hud/CM3 = new/obj/hud/Celesmid3
var/obj/hud/CM4 = new/obj/hud/Celesmid4
HPmeter1 = new(src,"Health","2,NORTH","HP","maxHP", list('mini meter.dmi' = 6,'mini meter mid.dmi', 'mini meter mid.dmi','mini meter right.dmi' = 24),32)
MPmeter = new(src, "Magic","2,NORTH-1","MP","maxMP", list('MPmeter.dmi' = 6,'MPmeter mid.dmi','MPmeter mid.dmi', 'MPmeter right.dmi' = 25),32)
EXPMeter = new(src,"Experience","2,NORTH-1","EXP","maxEXP", list('EXPL.dmi ' = 6, 'EXPM.dmi' = 32 ,'EXPM.dmi', 'EXPR.dmi' = 24),32)
Smeter = new(src, "Stamina","2, NORTH-19","Fatigue","maxFatigue", list('stamina.dmi' = 32, 'stamina2.dmi' = 34),32)
Celesmeter =new(src, "Celestial", "20,south","Celestial","maxCelestial", list('Celestial bar.dmi', 'CSB2.dmi' = "20,south+1",'CSB3.dmi' = "19,south+1",'CSB4.dmi' = "19,south"),39)
client.screen += new/obj/hud/RunWalk
client.screen += new /obj/MeleeHUD/Attack
client.screen += new /obj/MeleeHUD/Backstep
client.screen += new /obj/MeleeHUD/Sidestep
client.screen += new /obj/MeleeHUD/Dash
client.screen += new /obj/MeleeHUD/Guard
if(src.Elemental_Alignment == "Fire")
client.screen += list(new/obj/hud/HUDL1, new/obj/hud/HUDL2, new/obj/hud/HUDL3, new/obj/hud/HUDL4, new/obj/hud/HUDL5, new/obj/hud/HUDB2,
new/obj/hud/HUDB3, new/obj/hud/HUDB4, new/obj/hud/HUDB5, new/obj/hud/FHUD, new/obj/hud/FHUD2, new/obj/hud/FHUD3,
CM, CM2, CM3, CM4)
if(src.Elemental_Alignment == "Ice")
CM.icon_state = "Ice"
CM2.icon_state = "Ice"
CM3.icon_state = "Ice"
CM4.icon_state = "Ice"
client.screen += list(new/obj/hud/HUDL1, new/obj/hud/HUDL2, new/obj/hud/HUDL3, new/obj/hud/HUDL4, new/obj/hud/HUDL5, new/obj/hud/HUDB2,
new/obj/hud/HUDB3, new/obj/hud/HUDB4, new/obj/hud/HUDB5, new/obj/hud/IHUD, new/obj/hud/IHUD2, new/obj/hud/IHUD3,
CM, CM2, CM3, CM4)
if(src.Elemental_Alignment == "Wind")
CM.icon_state = "Wind"
CM2.icon_state = "Wind"
CM3.icon_state = "Wind"
CM4.icon_state = "Wind"
client.screen += list(new/obj/hud/HUDL1, new/obj/hud/HUDL2, new/obj/hud/HUDL3, new/obj/hud/HUDL4, new/obj/hud/HUDL5, new/obj/hud/HUDB2,
new/obj/hud/HUDB3, new/obj/hud/HUDB4, new/obj/hud/HUDB5, new/obj/hud/WHUD, new/obj/hud/WHUD2, new/obj/hud/WHUD3,
CM, CM2, CM3, CM4)
if(src.Elemental_Alignment == "Thunder")
CM.icon_state = "Thunder"
CM2.icon_state = "Thunder"
CM3.icon_state = "Thunder"
CM4.icon_state = "Thunder"
client.screen += list(new/obj/hud/HUDL1, new/obj/hud/HUDL2, new/obj/hud/HUDL3, new/obj/hud/HUDL4, new/obj/hud/HUDL5, new/obj/hud/HUDB2,
new/obj/hud/HUDB3, new/obj/hud/HUDB4, new/obj/hud/HUDB5, new/obj/hud/THUD, new/obj/hud/THUD2, new/obj/hud/THUD3,
CM, CM2, CM3, CM4)
if(src.Elemental_Alignment == "Earth")
CM.icon_state = "Earth"
CM2.icon_state = "Earth"
CM3.icon_state = "Earth"
CM4.icon_state = "Earth"
client.screen += list(new/obj/hud/HUDL1, new/obj/hud/HUDL2, new/obj/hud/HUDL3, new/obj/hud/HUDL4, new/obj/hud/HUDL5, new/obj/hud/HUDB2,
new/obj/hud/HUDB3, new/obj/hud/HUDB4, new/obj/hud/HUDB5, new/obj/hud/EHUD, new/obj/hud/EHUD2, new/obj/hud/EHUD3,
CM, CM2, CM3, CM4)
if(src.Elemental_Alignment == "Light")
CM.icon_state = "Light"
CM2.icon_state = "Light"
CM3.icon_state = "Light"
CM4.icon_state = "Light"
client.screen += list(new/obj/hud/HUDL1, new/obj/hud/HUDL2, new/obj/hud/HUDL3, new/obj/hud/HUDL4, new/obj/hud/HUDL5, new/obj/hud/HUDB2,
new/obj/hud/HUDB3, new/obj/hud/HUDB4, new/obj/hud/HUDB5, new/obj/hud/LHUD, new/obj/hud/LHUD2, new/obj/hud/LHUD3,
CM, CM2, CM3, CM4)
if(src.Elemental_Alignment == "Darkness")
CM.icon_state = "Darkness"
CM2.icon_state = "Darkness"
CM3.icon_state = "Darkness"
CM4.icon_state = "Darkness"
client.screen += list(new/obj/hud/HUDL1, new/obj/hud/HUDL2, new/obj/hud/HUDL3, new/obj/hud/HUDL4, new/obj/hud/HUDL5, new/obj/hud/HUDB2,
new/obj/hud/HUDB3, new/obj/hud/HUDB4, new/obj/hud/HUDB5, new/obj/hud/DHUD, new/obj/hud/DHUD2, new/obj/hud/DHUD3,
CM, CM2, CM3, CM4)
if(src.HPmeter1) src.HPmeter1.Update()
if(src.MPmeter) src.MPmeter.Update()
if(src.Celesmeter) src.Celesmeter.Update()
Problem description:
Since I switch over to 4.0, its been giving me the invalid owner runtime. I have no idea why. Could someone enlighten me?
runtime error: Invalid owner.
proc name: New (/atom/movable/HUDmeter/New)
source file: HUDmeter.dm,172
usr: null
src: HUDmeter (/atom/movable/HUDmeter)
call stack:
HUDmeter (/atom/movable/HUDmeter): New(null, null, null, null, null, null, 30, 4, 1)
Asch (/mob/player): Read(players/p/pyrodragons.sav (/savefile))
Pyro_dragons (/client): base LoadMob("asch")
Pyro_dragons (/mob/login): Load game()
LoadGame (46,71,1) (/turf/title/LoadGame): Click(LoadGame (46,71,1) (/turf/title/LoadGame), "mapwindow.map", "icon-x=25;icon-y=5;left=1")