ID:267357
 
Dunno if this should be in code problems... well it was but somebody deleted it for no apparent reason.

obj
sword
density = 1
New(Loc)
for(var/mob/M in Loc)
if(M.mobtype=="Enemy")
M.HP-=1 M.DeathCheck()
else
Bump(mob/O)
step_away(O,src,1)

that step away line is the error.

error I get is proc not allowed within another proc. please help.

--Ray


It looks like you're trying to define the Bump() proc from within New(); hence the error. Nothing in that "else" section is close to the correct syntax.

Also wrong is assuming that the argument to Bump() must be a mob; it can be any atom you bump into, so you need to use ismob(O) to double check.

Lummox JR
In response to Lummox JR
Lummox JR,
THanks loads ^_^ yet still I don't know what that means XD. Yeah I'm a rubbish coder.

--Ray

EDIT: Can someone put what Lummox said in Newbie terms please? Or fix the code for me please?

--Ray