ID:264760
 
Code:
GM //The GM code.
var
list
GMs=list("Alex Ovide, Kryu") //this is a list of GMs. So "GMs" is now a list and the list equals what's in the "()".
list
players=list() //this is another list wich stores all the players GM's should not be placed in this list
GM
verb //This is the verb characteristic of a gm. So like a folder named GM thats holds his powers
Boot()
del(input("Which player would you like to boot?","Boot") in (players))
mob
player
var
health=10
strength=3
Login()
..()
if(src.key in GMs) //If things check out they get bonuses and powers
src.verbs +=typesof(/GM/verb)
src.health +=20
src.health +=10
else
players.Add(src)


Problem description:When I compile it give me 2errors
loading Gundam 0079 Era.dme
GM.dm:26:error: src.health: undefined var
GM.dm:27:error: src.health: undefined var

Gundam 0079 Era.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)


I don't understand what I did wrong?


The health variable is declared under /mob/player. You're overriding Login() under /mob. Mobs of the type /mob can't use variables declared under them, it only works the other way.
I suggest indenting Login() once, so it's under /mob/player.
In response to Kaiochao
Thanks it works now I figured it out after hrs of bangging my head [I'm a new coder working on a gundam game lol]