ID:142504
 
Code:
var
InventoryOne = "Regular Inventory" //Whatever InventoryOne and InventoryTwo is
InventoryTwo = "Second Inventory" //will be the name on the statpanel, up top
InventoryThree = "Third Inventory"
obj
var
WhatInventory = null
obj
DblClick()
if(src in usr.contents) return
if(src in usr.contents2) return
if(src in usr.contents3) return
else
set src in oview(1)
if(WhatInventory == InventoryOne)
src.loc = usr
usr << "You have picked up a [src]!"
return
if(WhatInventory == InventoryTwo)
usr.contents2 += new src.type
usr << "You have picked up a [src]!"
for(var/item in usr.contents2)
usr << item
del src
return
if(WhatInventory == InventoryThree)
usr.contents3 += new src.type
usr << "You have picked up a [src]!"
for(var/item in usr.contents3)
usr << item
del src
return
usr << "Please contact the administrator, your item seems to be bugged. (Error 1)"


Problem description:
Well everything works besides one important part..... you can pickup from everywhere. I need it so you can only pickup within one space...
    DblClick()
if(src in usr.contents) return
if(src in usr.contents2) return
if(src in usr.contents3) return
else
set src in oview(1)

You can't use a setting like that. Settings should always be the first thing in the proc, and I'm not even sure if it would work properly in DblClick() (probably not). Also, your else statement here is completely useless due to the fact that the proc returns if the if() is true. Anyways, change it to something like:

    DblClick()
if(src in usr.contents) return
if(src in usr.contents2) return
if(src in usr.contents3) return
if(!(src in view(1))
if(WhatInventory == InventoryOne)
src.loc = usr
usr << "You have picked up a [src]!"
return
//Whatever else goes here

That said, your whole inventory system doesn't seem to be done in a great way. What's with usr.contents2 and usr.contents3? There are actually quite a few problems that you may want to rethink, with which someone should be able to help you out if you ask nicely.
In response to Nickr5
content2 and contents thee is for items and weapons, 1 is for armour
In response to Nategrant
Why do you have seperate contents just for each type? And for that matter, why do you even name them such vague names?