ID:147816
 
I forget whose tutorial I used, I started this some time ago, but it started flooding me with errors.
mob/Stat()
statpanel("Stats")
stat("Health",src.health_meter)
stat("Armor",src.mana_meter)
src.Update(src)<b>
src.health_meter.num = (src.HP/src.MHP)*src.health_meter.width</b>
src.mana_meter.num = (src.MP/src.MMP)*src.mana_meter.width
src.health_meter.Update()
src.mana_meter.Update()
src.health_meter.name = "[src.HP]/[src.MHP]"
src.mana_meter.name = "[src.MP]/[src.MMP]"
statpanel("Inventory",src.contents)

runtime error: Undefined operation
proc name: Stat (/mob/Stat)
source file: Stats.dm,6
usr: Enigmaster2002 (/mob/other/choosing_character)
src: Enigmaster2002 (/mob/other/choosing_character)
call stack:
Enigmaster2002 (/mob/other/choosing_character): Stat()
Ah, I found it stops flooding me with that error once I connect to a mob. It never did this before, but could anyone tell me how to prevent this?
Looks like you didn't close something correctly above that procedure. At least, that's the only explanation I can think of. mob/Stat() is valid, although you may wish to throw in the ..() just to be sure. Generally, whenever I get an error like that, it's because I screwed up somewhere above it.
In response to Enigmaster2002
Bah, nevermind, I got it. I got annoyed with it and didn't look it over carefully enough.