C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[75756] RAD Studio 오류
심재민 [borlandcpp] 2041 읽음    2020-01-24 10:02
RollBtn->Visible=false;
    int dice=Roll();
    ShowMessage("You got "+IntToStr(dice)+"!");
    i1+=dice;
    if(i1>=44){
        ShowMessage("Here's your salary!");
        money[0]+=1000000;
        i1=i1%44;
    }
    P1->Left=squares[i1].pos.x;
    P1->Top=squares[i1].pos.y;
    int boardtype=squares[i1].type;
    switch(boardtype){
        case 0:
            int landHost = squares[i1].host;
            int pay = squares[i1].money/5;
            if(landHost==1){
                ShowMessage("It's your land!");
            }
            else {
                if(squares[i1].hasHotel==1){
                    pay*=2;
                    ShowMessage("This land has a hotel!");
                }
                ShowMessage("Paid "+IntToStr(pay)+"W to Player "+landHost+"!");
                money[0]-=pay;
                money[landHost-1]+=pay;
                if(money[0]<=0){
                    ShowMessage("You Lost!");
                    Form1->Close();
                }
            }
            RollBtn->Visible=true;
            break;
        case 1:
            ShowMessage("This land is empty with money "+IntToStr(squares[i1].money)+"W.");
            BuyGroup->Visible=true;
            break;
        case 2:
            //Chance code needed
            RollBtn->Visible=true;
            break;
        case 3:
            //vertex code needed
            RollBtn->Visible=true;
            break;
        default:
            RollBtn->Visible=true;
            break;
    }

여기서 각각 case 1, case 2, case 3, default 에 대해서 cannot jump from switch statement to this case label 이라고 뜨네요

+ -

관련 글 리스트
75756 RAD Studio 오류 심재민 2041 2020/01/24
75757     Re:RAD Studio 오류 방태윤 2030 2020/01/24
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.