proc name: ExpBar (/mob/proc/ExpBar)
usr: XzDoG (/mob/Choose)
src: Player (/mob/Player)
call stack:
Player (/mob/Player): ExpBar(null)
XzDoG (/mob/Choose): NewGame()
XzDoG (/mob/Choose): Login()
mob/proc/NewGame()
New.ExpBar()
new/obj/MeterEnd/Left(src.client)
new/obj/MeterEnd/Right(src.client)
new/obj/Meter/Experience1(src.client)
new/obj/Meter/Experience2(src.client)
new/obj/Meter/Experience3(src.client)
del(src)
..()
mob/proc/ExpBar(mob/Player/M)
var/Meter_Width = 17
var/Percent = round(M.Exp/M.MaxExp * Meter_Width * 3)
for(var/obj/Meter/Experience1/H in M.client.screen)H.icon_state = "[(Percent>Meter_Width)?(Meter_Width-1):Percent]"
for(var/obj/Meter/Experience2/H in M.client.screen)H.icon_state = "[(Percent>(Meter_Width*2))?(Meter_Width-1):Percent-Meter_Width]"
for(var/obj/Meter/Experience3/H in M.client.screen)H.icon_state = "[Percent-(Meter_Width*2)]"
if(M.Exp==M.MaxExp)for(var/obj/Meter/H in M.client.screen)H.icon_state="18"
Help me fix this runtime please?
The only something.Exp there is M.Exp. Hence, M is the null in the null.Exp error.
A quick glance at where you called the proc makes it obvious that you never sent an argument to ExpBar(). Since there's no argument to fill in for M, M is null. Solution: Call your proc correctly.
Lummox JR