Can you fix it please?

I know nothing about C# or JavaS., so i need help. I tried this but thats giving error messages like:

Assets/Standard Assets/Scripts/KendiScriplerim/MenuHareketi.js(6,13): BCE0044: expecting ), found '='.

and like:

Assets/Standard Assets/Scripts/KendiScriplerim/MenuHareketi.js(6,14): BCE0043: Unexpected token: 2.

or like:

Assets/Standard Assets/Scripts/KendiScriplerim/MenuHareketi.js(15,1): BCE0044: expecting EOF, found 'else'.

that :confused:

var menusayi =1;
function Update() 
{
if (Input.GetKeyDown(KeyCode.UpArrow)) 
{
if (menusayi==2);
menusayi=1;
}
else
{
if (menusayi==3){
menusayi=2;
}
}
}
else
{
if (menusayi==4){
menusayi=3;
}
}
else{
if (menusayi==1){
menusayi=4;
}
}

So anybody can fix it for me? Thank you.

To start of.

It is if, then else if… x how many you need, then one else

So:

else if (menusayi==2)
{
menusayi=1;
}

And a mistake in if (menusayi==2);, there should never been an ; after an if.
Google if else statements :wink:

Thank you for post. I cant say i know english and there is no info or source in my language.
After then your help all errors fixed, Im grateful, thank you.