proc/powerupgen()
var/obj/powerup/T = pick(typesof(/obj/powerup - /obj/powerup))
new T(pick(locations1))
world << "Debug : a [T] has been made!"
This is producing:
runtime error: type mismatch
proc name: powerupgen (/proc/powerupgen)
source file: powerups.dm,32
usr: Sariat (/mob/spectator)
src: null
call stack:
powerupgen()
Sariat (/mob/spectator): test()
Line 32 is the var/obj/powerup/T line. And I am calling the proc from a test verb.
Thanks for reading!
-ST
I have not used typesof() much. However, I believe it returns a list. The purpose of the subtraction is to remove the base type from that list. Should the subtraction be done outside of the typesof() argument rather than as input?