ID:266958
 
Ok, I need to use
var/slot = "/obj/inventory/slot" + "[N]"
as a path.
It outputs it as the correct path, but for some reason it doesnt think "/obj/inventory/slot1" is the same as /obj/inventory/slot1's type var.
-DogMan
Dog Man wrote:
Ok, I need to use
var/slot = "/obj/inventory/slot" + "[N]"
as a path.
It outputs it as the correct path, but for some reason it doesnt think "/obj/inventory/slot1" is the same as /obj/inventory/slot1's type var.

That's because slot is defined as a text string, and not as a type. Depending on what you're up to here, the coding can be a bear. However, if you're just trying to compare the two, use this:

if(slot == "[obj.type]")

That will convert the type to a string for the comparison.