ID:180787
 
I downloaded Spuzzum's stats meter snippet thing...I put it in(I have the meter icon by the way)...and I have two errors

heres the code...

mob
var
obj/meter/meter
health = 50
maxhealth = 100

New()
..()
src.meter = new /obj/meter

Stat()
src.meter.num = (src.health/src.maxhealth)*30
src.meter.Update()
statpanel("Stats")
stat("Health:",src.meter)

obj
meter
icon = 'meter.dmi'
icon_state = "0"
proc
Update()
src.icon_state = "[round(src.num)]"

Does anyone see the two errors? Because I can't find them...I hate errors...
mob
var
obj/meter/meter
health = 50
maxhealth = 100

New()
..()
src.meter = new /obj/meter

Stat()
src.meter.num = (src.health/src.maxhealth)*30
src.meter.Update()
statpanel("Stats")
stat("Health:",src.meter)

obj
meter
icon = 'meter.dmi'
icon_state = "0"
proc
Update()
src.icon_state = "[round(src.num)]"

Does anyone see the two errors? Because I can't find them...I hate errors...

That code doesn't have any errors that I can see...

What are the errors you're getting?

(That was just as an example, by the way... if you already have a health var, remove that portion. It's intended to show you how (that's what snippets are for), not to be a pop-in library.)
In response to Spuzzum
When I compile my code I get 2 errors...when I take out the code I showed, I get no errors when I compile...is there a way to find out what line the errors are on without have to change every line till I find the errors?

Oh and I don't have a health var in my script except for the one in the snippet...is that my mistake...or do I need another script for that snippet to work?