[SOLVED] Toil and trouble....certainly toil for me!

the problem is your enemy bits you are defining enemy in 2 different places in a way that is not compatable. try changing the enemy = chooseTarget() to enemy1 = chooseTarget()

it is fine i got it but thanks anyway