Well are the two lines right next to each other like that in the full source? Because if they are then that's your problem. For example:
// atte starts as 0
If mouseclick()=1 and atte=0 // both true
attack1=1
player(1).panimestate#=2
atte=1 // atte now equals 1
endif
If mouseclick()=1 and atte=1 // both true (because you've set atte to 1)
attack1=1
player(1).panimestate#=7
atte=0 // atte now equals 0 again
endif
// end result is atte = 0
// atte starts as 1
If mouseclick()=1 and atte=0 // false because atte = 1
attack1=1
player(1).panimestate#=2
atte=1
endif
If mouseclick()=1 and atte=1 // both true as atte is still 1
attack1=1
player(1).panimestate#=7
atte=0 // atte now equals 0
endif
// end result is atte = 0
Thus, you see that regarless of which way the switch is to start with, the result will always be atte = 0. You would be better served by something like:
if mouseclick() = 1
if atte = 1
attack1=1
player(1).panimestate#=7
atte=0
else
attack1=1
player(1).panimestate#=2
atte=1
endif
endif
Hope that helps.