ID:262761
 
Code:
mob/arch
icon = 'archer.dmi'
mob/arch/verb
Attack(mob/M in oview(4))
if(M in oview(2))
usr << "[M] is too close to you!"
if(usr.dead == 1)
return 0
if(M.team == usr.team && freeforall == 0)
usr << "[M] is on your team!"
return 0
if(M.dead == 1)
return 0
if(usr.turn >= 1)
if(M.weak == 1)
var/a = rand(1,5)
if(a > 4)
M.weak = 0
world << "[M] recovers from weakness"
else
world << "[M] is Weak!"
var/a = rand(1,usr.maxstr)
if(usr.weak == 1)
a -= 1
M.hp -= a
world << "[usr] attacks [M] for [a] dmg"
if(M.hp <= 0)
world << "[M] Dies!"
M.dead = 1
usr.kills += 1
M.turn = 0
M.icon_state = "dead"
if(M.dlug == 1)
M.hp = 20
M.maxstr = M.omaxstr
usr.turn -= 1


Problem description:
Dusk (/mob/arch): Attack(Rick (/mob/arch))
runtime error: type mismatch
proc name: Attack (/mob/arch/verb/Attack)
usr: Dusk (/mob/arch)
src: Dusk (/mob/arch)
call stack:
Dusk (/mob/arch): Attack(Rick (/mob/arch))
this happens and prevents the attack, what is wrong with it?

cant anyone help?
In response to Rky_nick
Little adjustments that run smoother:
hp-- // This is the same as hp-=1
hp++ // same as hp+=1
if(var==1) // Boolean var, should be: if(var)
if(var==0) // Another one. Should be: if(!var)
In response to Mysame
I know.(it doesnt make it smoother, only faster to type.I've already typed it.)
In response to Rky_nick
It does. Not even noticable, but it does. No reason to lag something, now, is there?
In response to Mysame
i really dont care. I really want to get the problem fixed.(not like lags happening that much anyways -- its a turn based game)
oh and most of those if(var==1or0) things are not false or true(dead can be 3 for ghost, dlug will be used later for more)
In response to Rky_nick
So can anyone help with the problem?