ID:261814
 
When a user walks onto the platform the user whos play = 1 should atack first. I know the code doesnt make sense now how it works but im gona add onto it but i wana get this working first. Please help. The error is :Missing Condition

P.S, I realize it will take health off of the user attacking, I just put that there as an example.

mob
icon = 'Robot.dmi'



var
Play = 0
Health=100
Stat()
statpanel("Status")
stat("Play","[usr.Play]")




area
Battle
Entered()
if usr.Play = 1
switch(input("Battle Options")in list("Battle","Cancel"))
if("Battle")
usr.Health-=1// this wont actually be here i put this here to prevent others from ripping my actualy fighting code. What I have given shoudl be enough
if("Cancel")
return
else
usr << "It is your opponents turn first"
world << "It is your turn"
Exited()
usr << "Thanks for playing!"


//Thanks for any help.
Umm, nvm, i got it. Thanks anyways though.
In response to The Conjuror
In future, if no one has replied please delete your post
Don't use usr in Entered(). Don't use usr in Enter(). Don't use usr in Exited(). Don't use usr in Exit(). Don't use usr in Move(). Don't use usr in Login(). Don't use usr in Logout(). Don't use usr in procs.
In response to Garthor
Thanks for the advice, this is basically the first major hing im trying to programm without demos or tutorials or copying old code from my other games. Thanks for the advice though, but I figured it out. I took usr out and added brackets. Works now, plz note that I got it before you told me Garthor, so you did not solve the problem and wont be thanked for that
But still be mentioned for the advice.