Results 1 to 7 of 7

Thread: error help

  1. #1
    aaronpro
    Guest

    error help

    working on a card game and im trying to cover all errors the players come across.

    wierd things happen often

    -a player cannot put a card in a open, usuable slot on the board

    -a person will simply be skipped

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    um... We can't help you much if you don't give us some of your code.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  3. #3
    aaronpro
    Guest
    heres it is the code is really bulky and inefficient. i havent really learned vb. if they are suggestions on making it more
    efficient and any errors



    www.geocities.com/aaronpro/TRIPLETRIAD.zip

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    When an error is generated it will display the associated error number. In this way, you can connect the number with the error in your error trapping routine. Example: Error 13 is a Type Mismatch and 68 is Drive Not Found, so, knowing this, you can trap for errors, and handle each error differently.
    VB Code:
    1. Private Sub DoSomethingCool()
    2. On Error Goto ErrRtn
    3. 'code to do cool stuff
    4. Exit Sub
    5. ErrRtn:
    6.    Select Case Err
    7.      Case 13 'type mismatch
    8.        'handle type mismatch
    9.      Case 68 'drive not found
    10.        'handle drive not found
    11.      Case SoOnAndSoForth
    12.        'handle SoOnAndSoForth
    13.      Case Else
    14.        Msgbox Err & " " & Error
    15.    End Select
    16. End Sub

  5. #5
    aaronpro
    Guest
    can anyone suggest good resources for learning vb?

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Take a look at some of Jamie's tutorials - http://www.vbforums.com/showthread.p...hreadid=143394

    Pick up a book on beginning VB.

    Monitor this forum daily.

  7. #7
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Originally posted by Hack
    Monitor this forum daily.
    Good advise I've learnt more in 2 weeks than i have in 2 months.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width