pay
icon_state = "pay"
Click()
if(locate(/obj/Items/Bought/Silver) in usr)
for(var/obj/Items/Bought/Silver/G in usr)
if(G.amount >= source.worth)
G.amount -= source.worth
G.name = "[G.amount] Silver Pieces"
source.paid = 1
usr << "You purchase the [source] for [source.worth] silver pieces."
usr._OrganizePack()
else
usr << "You need [source.worth] silver pieces!"
usr._ClearOptions(source)
Problem description:
For some reason, it doesn't go past the 'if locate' even if the object is in your inventory.
O.o oh, well then is usr the thing you wish it to be? Then after that are you sure an object of type /obj/Items/Bought/Silver is in fact in that usr's contents. After all that checked off put a simple debug message before the if and then inside the if.
Its pretty simple from there. If the message shows up before but not inside the if then the usr isnt what you want it too be or there is not an object of type in the usr's contents.
Hope that helps :)