SRL Archive - OSR Help

For Loop Trouble


YoHoJo

2011-12-01 20:47:52

  
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
If I=0 Or 6 Or 12 or 18 Then
Begin
Writeln('TopBox');

but it doesn't, why not??

euphemism

2011-12-01 20:49:06


If ((I=0) Or (I = 6) Or (I = 12) or (I = 18)) Then
Writeln('TopBox');

YoHoJo

2011-12-01 20:53:54

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