Adblock breaks this site

Try Except

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

  1. Jukka

    Jukka Active Member

    Joined:
    Nov 23, 2005
    Posts:
    244
    Referrals:
    0
    Sythe Gold:
    0
    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?
     
  2. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    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
     
  3. Jukka

    Jukka Active Member

    Joined:
    Nov 23, 2005
    Posts:
    244
    Referrals:
    0
    Sythe Gold:
    0
    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! >


 
 
Adblock breaks this site