BCE0044 expecting }, found ".

I keep getting BCE0044 expecting }, found ". when I try to test my game, I dont know what I am doing wrong but hears my code so if anyone could help that would be much appreciated. :slight_smile:

//swinging animations

animation.play("Swing");

animation["Swing"].speed = 2;

isswinging = true;

canswing = false;

}

{

if(canswing == false)
{

}
swingtimer -= swing.deltaTime;
{
if(swingtimer <= 0)

{
swingtimer = 1;
canswing = true;
isswinging = false;

Your script’s syntax is odd, so please make a backup, replace it with my edited version, and tell me if the error is still there.

Please complete the edited version, because I have commented a decision that I need you to make.

animation.play("Swing");
 
animation["Swing"].speed = 2;
 
isswinging = true;
 
canswing = false;
 
if(canswing == false)
{
  
	swingtimer -= swing.deltaTime;
	//Keep the above line if you want it to be activated upon the condition of canswing being false
}
//swingtimer -= swing.deltaTime;
//If you do want this here, please keep it here and delete my code under the 'if canswing == false' condition.

if(swingtimer <= 0)
{
	swingtimer = 1;
	canswing = true;
	isswinging = false;
}