else if(usr.secondary == "Landmines")
usr.cooldown2 = 1
var/mob/M = new/atom/Landmines2
for(M)
M.Move(locate(usr))
spawn(15) usr.cooldown2 = 0
spawn(15) usr.middleclick = 0
return
atom
Landmines2
icon = 'objects.dmi'
icon_state = "Landmines"
layer = 5
density = 0
Enter(usr)
usr << "Landmine."
if(usr.maxHP > 0 && usr.layer == 5 && usr.icon != 'CharSprites.dmi')
usr.Damage = usr.Damage + rand(5,10)
usr.HP = usr.maxHP - usr.Damage
usr << "HP: [usr.HP]"
del(Landmines2)
if(usr.HP <= 0)
var/mob/M = usr
CheckDeathM(M)
Problem description:loading CodeGeass.dme
loading macro.dms
Combat\Combat.dm:982:error: usr.maxHP: undefined var
Combat\Combat.dm:982:error: usr.layer: undefined var
Combat\Combat.dm:982:error: usr.icon: undefined var
Combat\Combat.dm:983:error: usr.Damage: undefined var
Combat\Combat.dm:983:error: usr.Damage: undefined var
Combat\Combat.dm:984:error: usr.HP: undefined var
Combat\Combat.dm:984:error: usr.maxHP: undefined var
Combat\Combat.dm:984:error: usr.Damage: undefined var
Combat\Combat.dm:985:error: usr.HP: undefined var
Combat\Combat.dm:986:error: Landmines2: undefined var
Combat\Combat.dm:987:error: usr.HP: undefined var
CodeGeass.dmb - 11 errors, 0 warnings (9/19/15 12:47 pm)
I've already defined these in var and the landmine doesn't seem to be placing.
Simply change Enter(usr) to Enter(mob/M), then change all of the usr's to M's.