ID:140116
 
Code:
mob
var/Health
Login()
if(fexists("User"))
player
var Health = 10


Problem description:

It may not seem like much, but what it's giving me is hassle because it won't overwrite it, anyone know what the issue is?
You need to define the variable once. It is inherited to all the children of that parent. Y'know, typical objective-oriented programming.

mob
var/hp = X // all /mob children have this variable
player
hp = Y // Redefine's the default hp value that was inherited
var/sp = Z // This variable is available to the parent + children of /mob/player
In response to GhostAnime
Code:
mob
var/hp = X // all /mob children have this variable
player
hp = Y // Redefine's the default hp value that was inherited
var/sp = Z


loading Zombie Survival.dme
main.dm:37:error: X: undefined var
main.dm:37:error: =: expected a constant expression
main.dm:39:error: Y: undefined var
Zombie Survival.dme:16:error: Z: undefined var
main.dm:40:error: =: expected a constant expression

Zombie Survival.dmb - 5 errors, 0 warnings (double-click on an error to jump to it)

Those were the exact errors I got usng your precise code. You were saying?
In response to CodeWeasel22
This forum isn't for copy/pasting code, he gave you a general example, you weren't meant to use that exact snippet.
In response to CodeWeasel22
CodeWeasel22 wrote:
Code:
> mob
> var/hp = X // all /mob children have this variable
> player
> hp = Y // Redefine's the default hp value that was inherited
> var/sp = Z
>

loading Zombie Survival.dme
main.dm:37:error: X: undefined var
main.dm:37:error: =: expected a constant expression
main.dm:39:error: Y: undefined var
Zombie Survival.dme:16:error: Z: undefined var
main.dm:40:error: =: expected a constant expression

Zombie Survival.dmb - 5 errors, 0 warnings (double-click on an error to jump to it)

Those were the exact errors I got usng your precise code. You were saying?

X, Y, and Z were examples.
They might be 1, 2, and 3. Or 100, 50, 20. Or maybe "cake", "pie", and "cheese". Although having a string to represent hitpoints would be kind of odd and unfunctional.
In response to Nadrew
Sorry. I just get frustrated with coding sometimes.