var
global
ManaPotionsList[0]
world
New()
for(T in (typesof(/obj/Items/Mana_Potions) - /obj/Items/Mana_Potions))
ManaPotionsList += new T
creating = input("Which Mana Potion?") in ManaPotionsList
usr.contents += new creating
//vs.
usr.contents += new/obj/Items/Full_Mana_Potion
Problem description:
For some reason, when trying to create a new Full Mana Potion, using the first way doesn't work, even though in the runtime error it says the correct path.
runtime error: Cannot create objects of type /obj/Items/Mana_Potions/Full_Mana_Potion.
proc name: Create (/mob/GM/verb/Create)
usr: (src)
src: YuuHkiSay (/mob/Player)
src.loc: the grass (32,82,1) (/turf/ground/grass)
call stack:
YuuHkiSay (/mob/Player): Create()
Also, your world/New() should use the supercall ..() proc.
Edit: Or alternatively, you could do:
usr.contents += new creating.type
Make sure creating is typecasted as an object at least.