ID:263402
 
Code:
mob
verb
PlayCard(obj/Cards/C in usr.trunk)
if(istype(C,/obj/Cards/))
new C
C.loc=locate(usr.x-2,usr.y+1,usr.z)


Problem description:
runtime error: Cannot create objects of type /obj/Cards/Test.
proc name: PlayCard (/mob/verb/PlayCard)
usr: Dead_Demon (/mob/Player)
src: Dead_Demon (/mob/Player)
call stack:
Dead_Demon (/mob/Player): PlayCard(Test (/obj/Cards/Test))

I'm wanting to have it so when you click the PlayCard verb, it looks in your trunk and puts the card infront of you and 2 spaces to the left... I think I am not using new correct?
Because of the way you've set this up, C is an actual obj, not a type path. So the command "new C" is telling BYOND to create something new, but you're giving it an obj instead of a type path so it's getting confused. (I should see if it's possible to clarify that error message.) Normally it would be something like this:
C = new sometype(locate(usr.x-2,usr.y+1,usr.z))

But given that C is already instantiated, you probably don't need the new C line at all.

Lummox JR
In response to Lummox JR
Thankyou, I always get confused when having to spawn new types of things.