ID:269636
 
I am now trying to make it so that when you click on another player, If you have the ball it moves into the other players inventory and sets the other players hasball variable to 1. This is the code I thought would work:

obj
Football
icon = 'ball.dmi'
density = 0
Click()
if(src in view(1)) Pickup(usr)
proc
Pickup(mob/m)
loc=m
m.hasball = 1

But it comes up with the error undefined var. Could someone help me.
Is hasball defined for mobs?

(Incidentally, use dm tags when posting code. Just put <dm> and </dm> around the code)

Also, that indentation looks a little odd.
In response to Jp
The indentation is all correct and I forgot to put the DM tags around it.