mob/Login()
if(prob(50))
src.loc = locate(9,9,1)
else
src.loc = locate(27,9,1)
src << browse(loginmessage)
src.client.screen += new/obj/hudMeters/health_01
src.client.screen += new/obj/hudMeters/health_02
src.client.screen += new/obj/exphudMeters/exp_01
src.client.screen += new/obj/exphudMeters/exp_02
src.updateHealth()
src.updateEXP()
mob
proc
updateHealth()
var/percent=round(src.health/src.mhealth*100,10)
if(percent>100) percent=100
if(percent<0) percent=0
for(var/obj/hudMeters/o in src.client.screen)
o.icon_state=num2text(percent)
spawn(10) src.updateHealth()
mob
proc
updateEXP()
var/percent=round(src.exp/src.mexp*100,10)
if(percent>100) percent=100
if(percent<0) percent=0
for(var/obj/exphudMeters/o in src.client.screen)
o.icon_state=num2text(percent)
spawn(10) src.updateEXP()
obj
hudMeters
health_01
icon='meter_01.dmi'
icon_state="0"
New(client/c)
screen_loc="1,1"
c.screen+=src
health_02
icon='meter_02.dmi'
icon_state="0"
New(client/c)
screen_loc="2,1"
c.screen+=src
exphudMeters
exp_01
icon='emeters_01.dmi'
icon_state="0"
New(client/c)
screen_loc="1,2"
c.screen+=src
exp_02
icon='emeters_02.dmi'
icon_state="0"
New(client/c)
screen_loc="2,2"
c.screen+=src
Problem description:
proc name: updateHealth (/mob/proc/updateHealth)
runtime error: Cannot read null.screen
proc name: updateEXP (/mob/proc/updateEXP)
runtime error: Cannot read null.screen
proc name: New (/obj/hudMeters/health_01/New)
runtime error: Cannot read null.screen
proc name: New (/obj/hudMeters/health_02/New)
runtime error: Cannot read null.screen
proc name: New (/obj/exphudMeters/exp_01/New)
runtime error: Cannot read null.screen
proc name: New (/obj/exphudMeters/exp_02/New)
BYOND Warning: further proc crash messages are being suppressed to prevent overload...
This has only happened when the client clicked load to load his/her character. There was much more than this, but it was the same runtime error for each person, so I just narrowed it down to the one of each.
Also, make sure you have #define DEBUG in your code so you can pinpoint EXACTLY what line the error is comming from.