using end but it doesn't end

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • lucufa
    Forum Member
    • Jan 2007
    • 24

    using end but it doesn't end

    if (Who == blah) then
    Dialog.Message("", "blah", MB_OK, MB_ICONEXCLAMATION);
    end
    if (Who == car) then
    Dialog.Message("", "car", MB_OK, MB_ICONEXCLAMATION);
    end

    Dialog.Message("", "Final Answer", MB_OK, MB_ICONEXCLAMATION);

    --in the code above, i use end after the if's so shouldn't it end the script? but instead sometimes if it equals blah, it also pops a box saying Final Answer (the last line of code).. i want it to say either blah, car or if none of those then Final Answer, how can i do this?
  • bule
    Indigo Rose Customer
    • May 2005
    • 1116

    #2
    Code:
    if (Who == blah) then
    Dialog.Message("", "blah", MB_OK, MB_ICONEXCLAMATION);
    elseif (Who == car) then
    Dialog.Message("", "car", MB_OK, MB_ICONEXCLAMATION);
    else
    Dialog.Message("", "Final Answer", MB_OK, MB_ICONEXCLAMATION);
    end
    
    --rest of the code--
    The end you are talking about closes the if block; rest of the code always gets executed.
    (Just think of this end's usage as a BASIC's EndIf command.)
    Last edited by bule; 01-17-2007, 04:22 AM.
    Never know what life is gonna throw at you. ZubTech

    Comment

    • lucufa
      Forum Member
      • Jan 2007
      • 24

      #3
      thanks alot for your help bule!! :yes

      Comment

      Working...
      X