Results 1 to 3 of 3

Thread: For Loop Trouble

  1. #1
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default For Loop Trouble

    Simba Code:
    RockPattern:=[1,5,9,13,17,21,2,6,10,14,18,22,3,7,11,15,19,23,4,8,12,16,20,24];
      OreMid := DTMFromString('78DA63CC626260E0606440054C601226CA584' +
           'C849A3C209F8F809A6C209F19BF1A00AD2101F4');
    For I:=0 to 23 Do
      Begin
        StatsGuise('Dropping Ores: ' + IntToStr(I));
        SlotBox:=InvBox(RockPattern[I]);
        If FindDTm(OreMid, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
        Begin
          Writeln('dtm found');
          Writeln('I is:' + IntToStr(I));
          If I=0 Or 6 Or 12 or 18 Then
          Begin
            Writeln('TopBox');

    I get the Writeln('I is:' + IntToStr(I)); to say I is:0, but then then it should say 'TopBox' because
    Simba Code:
    If I=0 Or 6 Or 12 or 18 Then
          Begin
            Writeln('TopBox');

    but it doesn't, why not??

  2. #2
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Simba Code:
    If ((I=0) Or (I = 6) Or (I = 12) or (I = 18)) Then
            Writeln('TopBox');
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Solved
    If InIntArray([0,6,12,18], I) Then
    Thanks Narcle

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •