if(/obj/piece/ in locate(x,y,1))
t<<"You cannot place a stone on an existing stone."
return
I am only looking to see if there is 1 object in the location, however this doesn't work, The only way I can check to see if their is a piece on the location is to use:
for(var/obj/piece/p in locate(x,y,1))
t<<"You cannot place a stone on an existing stone."
return
However that's creating a variable which will never be used which is a bit wasteful, isn't there a shorter way which a new variable will not have to be created?
Note: The first code compiles fine, so I'm not sure if it's a bug or my own fault. The second code does work for what I am trying, but I hate creating things that will never be used anyways.