Home   Help Search Login Register  

Author Topic: Several lines after "then"  (Read 435 times)

0 Members and 2 Guests are viewing this topic.

Offline Kuro

  • Former Staff
  • ****
  • 2./FschJgBtl 251 Green Devils
    • VBS2 Mission Download Site
Several lines after "then"
« on: 12 Nov 2003, 09:15:42 »
Hallo,

i just wonder if i can make my script more readable:
Normally i make

? a>b : goto "Jump1"
Hint"Here i am"
~3
Hint"C you"
#Jump1
Hint "Hallo"
~5
Hint"Bye"


Do someone know if i can write i like a normal programming language (for example):
if {a>B} then
       {Hint "Hallo"
         ~5
          Hint"Bye"}
     else
        {Hint"Here i am"
           ~3
          Hint"C you"}

or even better

if {a>B} then {Hint "Hallo"; ~5; Hint"Bye"}
   else {Hint"Here i am"; ~3; Hint"C you"}

Any ideas are appreciated
Greetings
Kuro

Unnamed

  • Guest
Re:Several lines after "then"
« Reply #1 on: 12 Nov 2003, 09:45:41 »
From v1.82+ you can use:

Code: [Select]
if (a>B) then {Hint "Hallo" ; Hint"Bye"} else {Hint"Here i am" ; Hint"C you"}
But only on one line and you cant use ~ to pause AFAIK, I guess it treats the code between the {} as a function.