ID:175276
 
Here is the code I made in case somebody walks into a chicken

mob/Chicken
New()
spawn()
walk_rand(src,10)
Bump(/mob/Chicken/C)
if(src.client)
oview(10)<<"BUK BUK!!!"
else
return


But I get this error

ButterFlyhealing.dm:6:error: proc definition not allowed inside another proc

Thank you for your help
The bumb is a mob proc, move all the indentation below walk_rand back 2 tabs.
I also think your indentations wrong but it could be a forum bug.
Another thing you need to fix: oview(10) should be oview(10,src). Also, don't assume that C is actually a /mob/Chicken. You should use istype(C) to check it.

Lummox JR
In response to Lummox JR
Thank you very much for your help, but now I get somewhat of a runtime error..only I don't get an error, something just dosn't work.

Here is the beginning to my Bump


Bump(var/mob/Chicken/C)
if(istype(C))
stuff here
else
usr<<"Something is very wrong"



I think that's where the error is, because nothing happens. Both ways...
In response to SSChicken
There you go.You cant use usr in bump().I hope Im right.lol.I have the experiance with Bump().Ask all the forum goers.
In response to Soccerguy13
It dosn't work without that line either..or if I change the usr to C
In response to SSChicken
SSChicken wrote:
It dosn't work without that line either..or if I change the usr to C

It should be src, not usr or C.

Lummox JR
In response to Lummox JR
But that's still not where the problem is, I changed it to src and all the things that needed changing I changed.
In response to SSChicken
I think I'll take a stab at this. :)

You have that for a bump proc under mob/chicken correct? I haven't used bump much at all, but I believe it has to be under the players mob usually mob/player. If I'm correct only chickens who bump into chickens will call the proc. Hope this helps.