Try Except

Discussion in 'Archives' started by Jukka, Aug 13, 2007.

Try Except
  1. Unread #1 - Aug 13, 2007 at 11:08 AM
  2. Jukka
    Joined:
    Nov 23, 2005
    Posts:
    244
    Referrals:
    0
    Sythe Gold:
    0

    Jukka Active Member

    Try Except

    In scar there is "Try Except Finally" etc to avoid run time errors and other errors..

    What are the statements in visual basic?

    Edit: DARN On error resume next -.-

    How ever i have a new question:

    In scar when your using a case of if statement.
    in scar it would be:

    Code:
    If(World = 0)Then
      Begin ....
    
    How do i make the visual basic type of 'Begin' like in scar so i can have 2 things instead of only 1 thing it does AFTER a if()Then statement?
     
  3. Unread #2 - Aug 13, 2007 at 12:40 PM
  4. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Try Except

    If statements:
    Code:
    if VARIABLENAME = "hi" then
      msgbox "do stuff"
    else
      msgbox "do other stuff"
    end if
    
    if VARIABLENAME = "lol" then
      msgbox "do stuff"
    elseif VARIABLENAME = "aaa" then
      msgbox "do other stuff"
    end if
    
    select case VARIABLENAME
      case "lol"
        msgbox "dostuff"
      case "no"
        msgbox "do stuff more"
      case else
        msgbox "oh noes"
    end select
     
  5. Unread #3 - Aug 13, 2007 at 1:15 PM
  6. Jukka
    Joined:
    Nov 23, 2005
    Posts:
    244
    Referrals:
    0
    Sythe Gold:
    0

    Jukka Active Member

    Try Except

    what i mean was:

    Code:
    If World = 0 Then
      Msgbox "world"
      msgbox "ko"
    else if 
      msgbox "oh no"
      msgbox "oh yeah"
    end if
    
    I figured it out..
     
< K so | Need someone to train my staker! >

Users viewing this thread
1 guest


 
 
Adblock breaks this site