아이폰 앱을 만들고 있는데, 60 분마다 - (void) gameLoop을 호출하는 NSTimer에서 작동합니다. 여기 게임은있다 .Loop';'앞에 ';'가 올 것으로 예상 됨 토큰 오류?
-(void)gameLoop {
paratrooperTimer += 1;
if (gameState == KGameStateBegin) {
BtnStart.hidden = 0;
BtnResume.hidden = 1;
BtnPause.hidden = 1;
}
else if (gameState == KGameStateRunning) {
BtnStart.hidden = 1;
BtnPause.hidden = 0;
[self playGameLoop];
}
else if (gameState == KGameStatePaused) {
BtnResume.hidden = 0;
BtnPause.hidden = 1;
}
else if (gameState == KGameStateGameOver) {
[self endGame];
}
else if (paratrooperTimer == 120) {
(paratrooperTimer = 0);
[self spawnParatrooper];
}
}
'앞에'; ''이 (가) 있습니다. 토큰 "은 모든 if 문과 ParatrooperTimer + = 1 행에 있습니다.
GameState는 Integer이며 모든 KGameState ...입니다. 제발 도와주세요! 덕분에 무리가
여기 제출 한 코드에는 중괄호 불균형이 있습니다. 코드가 불균형 해 지거나 부분 복사 및 붙여 넣기로 인해 우리가 말할 수 없기 때문입니다. 여기에 입력 한 내용은 구문 오류입니다. –