ID:139687
 
Code:
obj
pickable
Click()
if(src.Team)
if(src.Team == usr.Team)
src.Move(usr) //puts it in the inventory
usr << "You got [src]!"
world << "[src] [src.Team]"
else
if(Collecting == 0)
if(usr.ItemsAllowed <= 2)
src.Move(usr) //puts it in the inventory
usr << "You got [src]!"
usr.ItemsAllowed++
else
usr << "You have enough Gadgets already!"


Problem description:
Well basically the problem is that when i click on an item that is in my inventory, it is picking it up again!
How do i prevent this
By checking if the item is in your inventory and disallowing action. It's not a complicated concept.
In response to Nadrew
tried that didn;t work
In response to Gamemakingdude
Then I suppose you did it wrong. There are a few methods.

if(locate(src) in usr)

if(src.loc == usr)


Are the easier of them.
In response to Nadrew
The first should be if(src in usr), using locate() would be wrong here.
In response to Garthor
Whoops, typed that up without double-checking it. Good catch.