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...
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: