ID:140056
 
mob
Login()
..()
src.spells += new /obj/spell/HPHeal()

verb/Spells()
src.currentSpell = input("Which Spell?","Select Spell") in spells
if(!src.currentSpell.needsTarget)
src.currentSpell.Cast(src)


i just gives me error when i get in the game
Please encase all code inside <dm></dm> tags, not bold tags.

Please tell the good people what the error is, not simply that it errors.
Also, you might want to post 'Cast()' as well.
Don't really know what the problem is, I made this real quick, I'm not saying you should use it, but it might help you towards a solution.

mob
Login()
src.spells += new/obj/Fire
src.spells += new/obj/Water
..() // I believe these are meant to be at the bottom? :o

verb/Spells()
var/obj/A = input("Which Spell?","Select Spell") in spells
if(A.tgn)
usr.tgn = 1

usr.currentSpell = A

if(!usr.tgn) // tgn = "Target Needed"
usr.Cast(currentSpell)
else
usr << "You need a target"
usr.currentSpell = null
usr.tgn = null

mob/var/currentSpell
mob/var/tgn


obj
var/tgn = 0
Fire
tgn = 1
Water


mob
var/list/spells = list()

proc
Cast(currentSpell)
world << "You cast [currentSpell]!"
src.currentSpell = null
src.tgn = null
Since I do not know what the error is, I am going to take a guess. My guess is that you do not have this spells list defined, or the new obj you created does not exist in your code.