Dark Age Games
Home Dark Age EX Dark Age 2 Message Board Fan Art FAQ Kelzar Mage DALpedia MS Forum
Board Index Dark Age General Bug Report Website Off Topic Register User Edit User User List Search

In reply to: I had it indented....(more) -- Tidus 21:09:01 08-24-2004

Hmmm...
Posted by: Xorlak
12:00:58 08-25-2004

(Tabs aren't recognized, only spaces... yet.)

I added an #if inside your #while loop:

#clear()
#include(fontmanager.prg)
#fontinit()
#setimagetransparent(slider.png,0,0,128,16,255,255,255)
#savescreen()
#x!=6
#x2!=2
#combolength!=0
#wait()
#done!=0
#while(done!=0)
{
  #for(x!=6;x!<114;x!=x!+0.25)
  {
  #setimage(pin.png,x!,3,8,10)
  #get(a$)
     #if(a$~="")
     {
       #if(x!<55)
       {
       #x2!=x2!-1
         #if(x2!<=1){#x2!=2}
       #put(x2!,5,notes.tst4)
       #newcombo$=""
         #for(i!=1;i!<combolength!;i!=i!+1)
         {
         #charat(combo$,i!,a$)
         #newcombo$=newcombo$+a$
         }
       #combo$=newcombo$
       #bordercolor(255,0,0)
       #delay(0.1)
       #bordercolor(0,0,0)
       }
       #if(x!>55)
       {
         #if(x!<68)
         {
         #playnote()
         #combo$=combo$+a$
         #combolength!=combolength!+1
         }
       }
       #if(x!>68)
       {
       #x2!=x2!-1
       #if(x2!<=1){#x2!=2}
       #put(x2!,5,notes.tst4)
       #newcombo$=""
         #for(i!=1;i!<combolength!;i!=i!+1)
         {
         #charat(combo$,i!,a$)
         #newcombo$=newcombo$+a$
         }
       #combo$=newcombo$
       #bordercolor(255,0,0)
       #delay(0.1)
       #bordercolor(0,0,0)
       }
     }
  }
#checkforcombo()
#if(done!=0) *<------- Added this
  #for(x!=114;x!>6;x!=x!-0.25)
  {
  #setimage(pin.png,x!,3,8,10)
  #get(a$)
     #if(a$~="")
     {
       #if(x!<55)
       {
       #x2!=x2!-1
         #if(x2!<=1){#x2!=2}
       #put(x2!,5,notes.tst4)
       #newcombo$=""
         #for(i!=1;i!<combolength!;i!=i!+1)
         {
         #charat(combo$,i!,a$)
         #newcombo$=newcombo$+a$
         }
       #combo$=newcombo$
       #bordercolor(255,0,0)
       #delay(0.1)
       #bordercolor(0,0,0)
       }
       #if(x!>55)
       {
         #if(x!<68)
         {
         #playnote()
         #combo$=combo$+a$
         #combolength!=combolength!+1
         }
       }
       #if(x!>68)
       {
       #x2!=x2!-1
       #if(x2!<=1){#x2!=2}
       #put(x2!,5,notes.tst4)
       #newcombo$=""
         #for(i!=1;i!<combolength!;i!=i!+1)
         {
         #charat(combo$,i!,a$)
         #newcombo$=newcombo$+a$
         }
       #combo$=newcombo$
       #bordercolor(255,0,0)
       #delay(0.1)
       #bordercolor(0,0,0)
       }
     }
  }
  #checkforcombo()
}
}

#method playnote()
{
  #if(a$~=A)
  {
    #if(a$~=S)
    {
      #if(a$~=D)
      {
      #end
      }
    }
  }
  #if(a$=A)
  {
  #put(x2!,5,notes.tst1)
  #x2!=x2!+1
  #midirest()
  #midiplay(putsomethinghere$)
  }
  #if(a$=S)
  {
  #put(x2!,5,notes.tst2)
  #x2!=x2!+1
  #midirest()
  #midiplay(putsomethinghere$)
  }
  #if(a$=D)
  {
  #put(x2!,5,notes.tst3)
  #x2!=x2!+1
  #midirest()
  #midiplay(putsomethinghere$)
  }
}

#method checkforcombo()
{
  #if(combo$="AAA")
  {
  #ectext(0,1,Congrats Moron)
  #delay(2)
  #done!=1
  }
}


That might seem redundant, but if you change the value of done! in the middle of the loop, the rest will of the loop will finish before checking to see if it has to run again.  With the #if, the second half won't run if done! is changed halfway though (i.e. the pin is on the right side).

----------
-Xorlak
Edit Post