ID:148256
 
var/damn_it = pick(typesof(/obj/card/Normal))
var/obj/cards = new damn_it

It's not creating the types of obj/card/Normal, anyone know why?
Yes it is, you just aren't assigning a location to it.

~>Volte
In response to Volte
I didn't show the full code, I am assaigning it a location, I just don't like showing my full codes
In response to Buzzyboy
obj/cards
mob/verb/test()
var/damn_it = pick(typesof(/obj/card))
var/obj/cards/picked = new damn_it
if(picked)
world << "picked exists"
if(picked.loc) world << "picked is at [picked.loc]"
else world << "picked has no location!"


I believe this test shows that Volte is correct?

-Koshigia
In response to Koshigia
Koshigia wrote:
> obj/cards
> mob/verb/test()
> var/damn_it = pick(typesof(/obj/card))
> var/obj/cards/picked = new damn_it
> if(picked)
> world << "picked exists"
> if(picked.loc) world << "picked is at [picked.loc]"
> else world << "picked has no location!"
>

I believe this test shows that Volte is correct?

-Koshigia

You defined the obj as being obj/cards, and in typesof you defined it as obj/card, I believe that test was flawful. =P

RaeKwon
In response to RaeKwon
I believe that test was flawful. =P

Flawful? Does that mean "awful flavour"? Or perhaps "lawful f......"? =P
In response to RaeKwon
RaeKwon wrote:
You defined the obj as being obj/cards, and in typesof you defined it as obj/card, I believe that test was flawful. =P

They're not different types; cards is the name of the var, not part of the path, whereas in /obj/card "card" is part of the type path.

Lummox JR