How would i make it so it looks for two of one item?
For some reason i get no errors with this but it doesnt work:
if(locate(/obj/mining/Coal) in usr && locate(/obj/mining/Coal) in usr)
Update:
I've also tried:
if(usr.Coal >= 2)
but it didnt work
ID:176648
Dec 23 2002, 8:59 am
|
|
You've used the word "it" too much here. What do you mean by "it"? Avoiding pronouns is a good idea any time you have to describe a problem.
This won't work because both locate() calls will return the same item.
If this var is properly set up and maintained to keep track of the number of coal items in your inventory, then it will work; but it's doubtful you set such a thing up.
What you really need is a for() loop that counts the items.
Lummox JR