ok...heres the problem...you should have had this:
;Artificial Intelligence Script
;Header
desc =light flash
;Triggers
:state=0:lightoff,state=1
:state=1,plrwithinzone:state=2
:state=2:timerstart,state=3
:state=3,timergreater=500:state=4
:state=4:lighton,timerstart,state=5
:state=5,timergreater=500:timerstart,state=3
:state=5,timergreater=2000:state=6
:state=6:plraddhealth=-500,state=0
End of Script
syntax error again...
also, i wouldent have the player live for 2 seconds (2000 = 2 seconds....)
but thats me, you may need it to do that...
also, you could compress that into 3 or 4 states, but i left it spaced out for the sake of you learning from it...