ID:263087
 
Code:
mob

var/list/worn
Blue { icon='Stick-Guy2.dmi' }
Red { icon='Stick-Guy.dmi' }

mob
NPC
icon = 'Blue Zife.dmi'
Walk_Delay = 1
Attack_Delay = 1
Sight_Range = 5
Attack_Range = 1

New()
..()
spawn() src.Wander()
return
var
Walk_Delay // How long to wait before it attacks
Attack_Delay // How long to wait before it attacks
Sight_Range // How far it can see
Attack_Range // How close the target has to be to attack it
mob/Target // Who the target is

proc
Get_Target()
if(src.Target) return
while(1)
for(var/mob/M in view(Sight_Range,src))
if((isPC(M)))
src.Target = M
return
return

Wander()
Get_Target()
while(1)
if(Target)
if(Target in view(Attack_Range,src)) // Checks to see if it is in Attack Range
sleep(Attack_Range)
src.Attack(Target) // Make sure to define a Attack proc
spawn() src.Wander()
return
else if(Target in view(Sight_Range,src)) // Checks to see if its in their Sight Range
sleep(Walk_Delay)
step_towards(src,Target)
spawn() src.Wander()
return
else if(!(Target in view(Sight_Range,src))) // Since the Target is no where around no use looking for them anymore
src.Target = null
sleep(Walk_Delay)
step_rand(src)
spawn() src.Wander()
return
sleep(Walk_Delay)
step_rand(src)
spawn() src.Wander()
return

proc
isNPC(mob/M) // Use this to check if a mob is a Non-Player-Character
if(!ismob(M))
return 0
if(istype(M,/mob/NPC/))
return 1
else
return 0

isPC(mob/M)
if(!ismob(M)) // Use this to check if a mob is a Player-Character
return 0
if(M.client)
return 1
else if(!M.client)
return 0


Login()
usr.loc = locate(10,16,1) // change to your title screen
usr.density = 1
..()
if(type == /mob)
var/mob_type = input(src,"Pick A Team!") in typesof(/mob) - /mob
client.mob = new mob_type


icon = 'Stick-Guy.dmi' //make it so all mobs will be created with the person icon
var
HP = 200 //define a new variable called HP, with a value of 30

proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging


verb
Attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,35) //assign a random # to a new variable
usr << "[damage] damage!" //tell the damage to the world
M:HP -= damage //take away the damage from M
M:DeathCheck() //check for death with a proc

Say(msg as text) //what the usr says is passed into "msg" as text


Problem description:
Code.dm:10:error::empty type name (indentation error?)
Code.dm:42:error:src.Attack:undefined proc
Code.dm:93:error:DeathCheck :definition out of place (bad indentation?)
Code.dm:107:error:Say :definition out of place (bad indentation?)

guy.dmb - 11 errors, 8 warnings (double-click on an error to jump to it)

Well, anyway, since you copied and pasted it from the dev forum, the indents are not really indents, they are spaces. You need to remove all the areas which are supposed to be indents and re-indent using TAB...
In response to Bobthehobo
Thats not the problem look at bottom
In response to Joseph Kearney
Well, you isNPC() and isPC() procs take out Login() and other verbs. you really need to look at your indentations.
In response to Bobthehobo
"Code.dm:42:error:src.Attack:undefined proc"


I'll also like to point out that your Attack "proc" is a verb. I remember you can't have it like that.
In response to RedlineM203
Noo, you can.

Either way, they're GLOBAL procs in case someone failed to notice.