2012-12-20 1 views
1

매우 기본적인 내용이지만 다음 함수는 컴파일시 구문 오류 2 개를 생성합니다. 아래에 나와 있습니다. 나는 그들을 알아낼 수 없다. 어떤 도움이라도 대단히 감사합니다.AS3 구문 컴파일 오류 - rightparen 전에 세미콜론이 예상됩니다.

Game, Layer 'Actions', Frame 2, Line 5 1086: Syntax error: expecting semicolon before rightparen. 

Game, Layer 'Actions', Frame 2, Line 5 1084: Syntax error: expecting rightbrace before semicolon. 



function fl_TouchEndHandler_2(event:TouchEvent):void { 
    // Drag & drop stuff... 
    contained[i] = Gem1_MC.hitTestObject(Gem4_MC)); 
    contained[i] = Gem2_MC.hitTestObject(Gem4_MC)); 
    contained[i] = Gem3_MC.hitTestObject(Gem4_MC)); 
    if (contained.indexOf(false) == -1) { // This returns -1 if it can't find false 
     gotoAndStop(1); 
    } 
} 

답변

2

당신은 ')'추가가

시도 :이 답변으로 문제가 해결되면 체크 표시를 클릭하면 수락으로

function fl_TouchEndHandler_2(event:TouchEvent):void { 
    // Drag & drop stuff... 
    contained[i] = Gem1_MC.hitTestObject(Gem4_MC); 
    contained[i] = Gem2_MC.hitTestObject(Gem4_MC); 
    contained[i] = Gem3_MC.hitTestObject(Gem4_MC); 
    if (contained.indexOf(false) == -1) { // This returns -1 if it can't find false 
     gotoAndStop(1); 
    } 
} 
+0

user1051467 @를 선택하십시오 – Niels