NEED HELP WITH ROCK PAPER SCISSORS GAME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • 12 years ago
    123
  • 12 years ago

    The error is because you are passing an integer to the command button

    Private Sub cmdPaper_Click(Index As Integer)

    change to

    Private Sub cmdPaper_Click()

    Second problem:

    You are declaring Dim Wins As Integer in each of the subs

    Therefore blanking the vakue each time.

     To stop this declare them outside the sub

     Option Explicit
    Dim Wins As Integer
    Dim Ties As Integer
    Dim Losses As Integer

    And remove the  

    Dim Wins As Integer
    Dim Ties As Integer
    Dim Losses As Integer

    from each of the subs.

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“I invented the term Object-Oriented, and I can tell you I did not have C++ in mind.” - Alan Kay