ID:2352470
 
Code:Here's the code I'm using, with a little help from a friend of mine.
mob/Stat()
statpanel("Status")
if(health>=15)
stat("<font color=\"#0013FF\">health</font>", "[health]/[maxhealth]")
else if(health>=10&&health<=14)
stat("<font color=E5EE2A>health</font>", "[health]/[maxhealth]")
else if(health>=5&&health<=9)
stat("<font color=FF0000>health</font>", "[health]/[maxhealth]")
else if(health<=4)
stat("<font color=#000000>health</font>", "[health]/[maxhealth]")
else
stat("health", "[health]/[maxhealth]")
stat("Money", "[money]")
..()


Problem description:There are no errors or warnings in the code, but when I start the game, instead of having the health show up in red, it simply puts it as health. Any help would be greatly appreciated. Thank you.

Edit: Just seen that it shows up as blue here, but not in the game...
The quick answer is that you're forgetting the # in the second and third stat calls. There are two other things that can be done here to make your life easier, so I'll rewrite the code to show you:
mob/Stat()
statpanel("Status")
switch(health)
if(-1 to 3)
stat("health", "[health]/[maxhealth]")
if(4)
stat({"<font color="#000000">health</font>"}, "[health]/[maxhealth]")
if(5 to 9)
stat({"<font color="#FF0000">health</font>"}, "[health]/[maxhealth]")
if(10 to 14)
stat({"<font color="#E5EE2A">health</font>"}, "[health]/[maxhealth]")
else // 15 and higher
stat({"<font color="#0013FF">health</font>"}, "[health]/[maxhealth]")
stat("Money", "[money]")
. = ..()

If you have a big chain of if statements all checking the same variable, you can probably simplify the code by using a switch instead. Also, if you need to use quotes within a string (programmers call text, like "asdflksadflkj", strings) then you can use {" whatever "} to make the string. You can also include newlines, which makes {""} a great solution for a lot of problems:
var validString = {"

Hi there! All sorts of stuff can go inside this "text document",
and it's still a valid string,
even indentation!

"}
In response to IainPeregrine
Hey there, thanks for helping me out, but unfortunately the same problem is pursuing. If there's a way to upload screenshots, I think it'd be easier for me to upload a screenshot of the problem for people to see that way.