Usually I'm able to work through these things, but I've only a week's experience with the language and this one has stumped me. Perhaps you could help. Here's the section I'm getting errors in:
if(Input.GetKeyDown("p")){
if (Time.timeScale == 1)
Time.timeScale = 0;
Screen.showCursor = true;
else
Time.timeScale = 1;
Screen.showCursor = false;
}
}
if(Input.GetKeyDown("m")){
if (Screen.showCursor == false)
Screen.showCursor = true;
else
Screen.showCursor = false;
}
It's giving me "unexpected symbol" errors all over the place.
Assets/Cursor.cs(22,28): error CS1525: Unexpected symbol `else'
Assets/Cursor.cs(27,18): error CS1519: Unexpected symbol `if' in class, struct, or interface member declaration
Assets/Cursor.cs(27,36): error CS1519: Unexpected symbol `(' in class, struct, or interface member declaration
Assets/Cursor.cs(28,48): error CS1519: Unexpected symbol `==' in class, struct, or interface member declaration
Assets/Cursor.cs(29,51): error CS1519: Unexpected symbol `=' in class, struct, or interface member declaration
Assets/Cursor.cs(31,51): error CS1519: Unexpected symbol `=' in class, struct, or interface member declaration
Most of the errors are redundant, but I figured I'd list them anyway. I've seen if statement in if statements laid out like this in other examples, but it doesn't seem to like it here. Any suggestions?