ID:179046
 
Click()
if(usr.client)
if(usr.action == 1)
usr<<"You can't do that now"
return..()
usr.ba = input("[usr]","What action will you take in this battle","What will you do?")in list("Attack","Run")
if(usr.ba == "Attack")
usr.action = 1
src.energy -= usr.strength
usr<<"You dealt [usr.strength] damage to the enemy"
if(usr.ba == "Run")
usr.action = 1
usr<<"You start to flee..."
sleep(20)
if(usr.pl == 314)
usr.loc = locate(3,1,4)
usr<<"You fled successfully!"
usr.action = 0

I have this but everything after the if(usr.ba == "Run")
I get duplicate definition errors on everything even usr<<"You start to flee..."
I don't know why either
please help
and thanks in advance
You didn't indent properly under the if(ba == "Run") part.
In response to Nadrew
I noticed when I posted but I edited the first message and the code but now I get an invalid expression error on usr.action = 1
:<
In response to Vermolius
You might want to try using a switch and/or an alert combo