2021-05-31

Scene 1, Layer 'Actions', Frame 1, 1084: Syntax error: expecting rightparen before colon

I'm new to ActionScript and I'm confused about these two errors. I already have some prior coding experience from other languages.

Scene 1, Layer 'Actions', Frame 1, Line 78, Column 20 1084: Syntax error: expecting rightparen before colon.

Scene 1, Layer 'Actions', Frame 1, Line 85, Column 20 1084: Syntax error: expecting rightparen before colon.

This is my code.

{
    timeStep += 1; //increment counter
    if (run)
    { //only if run = true is shift key has been pressed
        moveCharacter(evt:KeyboardEvent)
        {
            timeStep = 0; //reset the counter
        }
    }
    else if (timeStep == 2)
    {
        moveCharacter(evt:KeyboardEvent)
        {
            timeStep = 0; //reset the counter
        }
    }
}

I'm not sure where the problem is, I can't see one. Unless I'm blind.



from Recent Questions - Stack Overflow https://ift.tt/34uay24
https://ift.tt/eA8V8J

No comments:

Post a Comment