ID:262886
 
Code:
obj/bullet
icon = 'weapons.dmi'
icon_state = "bullet"
density = 1
Bump(mob/M)
if(istype(M,/mob/))
usr.hp -= 10000000
if(usr.hp<=0)
del(src)


Problem description:Whenever i put this in the code for the line of the del says "invalid expression" help plz

Everything under Bump() needs to be indented one tab over.
Are you wanting to delete the bullet or the person?
In response to Nadrew
1st of all i wanna delete the bullet,second nadrew i tried ur idea and it says "incosistent indention"
In response to Scissors Man
obj
Bullet
icon = 'weapons.dmi'
icon_state = "bullet"
density = 1
Bump(mob/M)
if(istype(M,/mob/))
usr.hp -= 10000000
if(usr.hp<=0)
del(src)

Try that it's indented perfectly. (Copied and pasted from .dm file xD).
In response to Scissors Man
Why do you define M and then continue with usr abuse?
In response to Scissors Man
Whoops, didn't read it right, the Bump() is indented once too far.
obj
some_obj
Bump(mob/M) // Notice how it's indented passed the object defination
// Do stuff
del(src)
In response to Chwgt
Thanks verrrrry much :-)
In response to Chwgt
The bullet will only delete when the person's health is below zero. You should also be using 'M' instead of usr.
That is the exact code from the demo I told you to look at... Dont copy and paste it, read it and then learn from it. Thats what demos are for.