ID:178962
 
I am certainly a nOOb that needs some help. I didn't realize that all I had to do was indent and fix my problem, but once I did, I got many new errors that I can't fix for some reason, such as undefined procs and vars. I would really apprcite some help since I practically started 2 days ago. Thanks in advance, here is my coding:

mob
/login()
icon = 'cloud.dmi' //main problem occurs right here.
icon_state = "Cloud"
var
hp = 10 //tells me these stats aren't used
str = 5
def = 2
turf
grass
icon = 'turf.dmi'
icon_state = "grass"
turf
water
icon = 'turf.dmi'
icon_state = "water"
density = 1
world
name = "Project1"
turf = /turf/grass //tells me that this isn't an identified type, when I think it is

usr.icon_state = input("Choose Character.") in list ("Cloud Strife","Aeris Gainsborugh")
usr.Move(locate(1,1,1)) //lastly, it says this is unidentified.
mob/PC
var
HP = 30
Max_HP = 30
strength = 3
exp = 0
exp_give = 0
verb
Attack(mob/M in oview(1))
var/damage = rand(1,strength)
usr << "You attack [M]!"
usr << "[damage] damage!"
M << "[usr] attacks you!"
M << "[damage] damage!"
M.HP -= damage
M.DeathCheck()
mob
var
HP
Max_HP
strength
exp
exp_give
proc
DeathCheck(mob/M)
if(src.type == /mob/PC)
PCDeathCheck()
else
if(src.HP <= 0)
usr.exp += src.exp_give
del(src)
PCDeathCheck(mob/M)
if(src.HP <= 0)
src.loc = locate(3,2,1)
src.HP = Max_HP


mob
NPC
enemy
name = "cactuar"
icon = 'enemy.dmi'
HP = 10
Max_HP = 10
strength = 2
exp_give = 5
var/mob/PC/P
New()
.=..()
spawn(1)
Wander()
proc/Wander()
while(src)
if (P in oview(5))
step_towards(src,P)
else
step_rand(src)
for(P in view(src))
break
sleep(5)
spawn(40)
Wander()
Bump(mob/M)
if (istype(M,/mob/PC))
Attack(M)
proc/Attack(mob/M)
flick("cactuar_attack",src)
sleep(2)
var/damage = rand(1,strength)
M.HP -= damage
view(src) << "[src] attacks [M]!"
view(src) << "[damage] damage!"
M.PCDeathCheck()
mob/Stat()
stat("Stats:",src.desc)
if(src == usr) statpanel("Inventory",src.contents)
stat(" HP: 100 ",HP)
stat(" Strength: 100 ",strength)
stat(" Experience: 100 ",exp)

All errors are shown with comments I added with //and the error. Please help! Thanks

-Flare0080
Flare0080 wrote:
mob
/login()

This is your problem. It needs to be mob/Login().

-Rcet