Search code examples
cocoa-touchinputidentifier

Expected Identifier Error?


Hi so I am trying to create an if statement where...if the sprite has been touched...then something will happen

However, for some reason, I am getting an expected identified error and can't for the life of me figure out why?

Thank you for any help and knowledge you can provide meKKInput* input = [KKInput sharedInput];

KKInput* input = [KKInput sharedInput];

if([input isAnyTouchOnNode:kan touchPhase:[KKTouchPhaseAny]])
    {
        for ( int x = 105.0f; x < 100000 ; ++x)
        {
            for ( int y = 50.0f; y < 100000 ; ++y)
            {
                kan.position = CGPointMake((x),(y));
            }

        }
    }

Solution

  • The square brackets around KKTouchPhaseAny (probably an enum) must be removed.