We help see next. .
Users questions: This is the preparation of a finger-guessing game of small game in which some BUG .... this game is the master, to test the ability required to do all, I believe every friend should have written this program, required by rules of the game is like this: a stone (value 2) Scissors (value 1) cloth (value 3) stone (Value 2) Scissors (value 1)> cloth (value 3) The following is the code in the form to add three radio buttons, and a framework: OptionExplicitPrivateSubCommand1_Click () Dimr, k, s, lDimiAsIn teger, aAsInteger, bAsInteger, ComputerAsIntegerDimUserSelAsStringFori = 0To2IfOption1 (i). ValueThenl = MsgB ox ("Your choice for" & Option1 (i). Caption & "whether to continue?", vbQuestion + vbYesNo, "game") UserSel = Option1 (i). CaptionExitForEndI fNextIfl vbNoThenExitSuba = = Cover User (UserSel) Randomizeb = Int (Rnd * 3 +1) b = CInt (b) k = Computer Cover (b) s = MsgB ox ("computer ready and you battle it out is" & k, vbInformation, "game") CallJudger (a, b) EndSubPrivateSubCommand2_Click () UnloadMeEndS ubPrivateSubForm_Load () Option1 (0). TrueEndSubPrivateFunctionCoverUser Value = (ByValTitleAsString) AsInte gerSelectCaseTitleCase "scissors" CoverUser = "1" Case "stone" CoverUser = "2" Case "cloth" CoverUser = "3" EndSelectEndFunction PrivateFunctionCoverComputer (ByValItrComAsInteger) AsStringSelectCaseItrComCase1CoverComputer = " " Case e2CoverComputer = " " Case3CoverComputer = " " EndSelectEndFunctionPrivateFunctionJudger (ByValaAsInteger, ByValbAsInteger)AsStringIfa bThenMsgBox Celebrate,YouWin! ElseIfa=bThenMsgBox Oh,YouDraw! ElseMsgBox "Sorry, YouLost!" EndIf after the implementation of these procedures can only lose the case and identify the tie situation. . Win situation can not be identified. . I ask where the above procedure BUG? It is not to be found error. . Wrong place to help look around to see it, thank you! TT Later, after a friend's instructions, the wrong place should be Judger function was wrong .. please help out TT I read the answer under the Galaxy brother found your answer is not. . This program and not the same as his, he has a lot of flexibility, I set out rules that are difficult Strategic areas can be imagined. . Appreciate your enthusiastic care of, thank you, although you do not really see what this requirement. Add 3 in the form of radio control array, then copy the code to see if you can go in the wrong place that your main problem slightly
Experts answer: is to determine the outcome of the situation when the number of missing , Followed by not having a line-continuation character "_." Can refer to my previous answer: http: ** iask.sina.com.cn * b * 9383334.html. Which contains relatively fast and on the determination method. Thank you! This Bar: PublicSubJudger (ByValaAsInteger, ByValbAsInteger) Ifa * b = 3ThenIfa bThenMsgBox "Celebrate, YouWin!" ElseMsgBox "Sorry, YouLost!" EndIfElseIfa = bThenMsgBox "Oh, YouDraw!" ElseIfa bThenMsgBox "Celebrate, YouWin!" ElseMsgBox "Sorry, YouLost!" EndIfEndSub you Option control program in the Caption to be are "rock, scissors, cloth," . You can download my free minutes code good "rock, scissors, cloth" game http: ** ishare.iask.sina.com. cn * cgi-bin * fileid.cgi? fileid = 1759550 into your program can look like, would you believe that your teachers are breathtaking.