problem with assigning value to variable

 

hi all, 

   string status = "";
   double currentLow = LowMapBuffer[shift];
   PrevLowMapBuffer[shift]=LowMapBuffer[shift];
   double previousLow;
   // find the previous Low
   for (int i=shift+1; i<shift+1000; i++)
   {
      if (LowMapBuffer[i] != 0 && ZigzagBuffer[i] != 0)
      {
         previousLow = LowMapBuffer[i];
         break;
      }
   }
      Comment ("PrevLowMapBuffer=", PrevLowMapBuffer[shift]," LowMapBuffer=", LowMapBuffer[shift]);

the result from the above partial code is PrevLowMapBuffer = 0, LowMapBuffer = 1085 

just wondering why couldn't i assign value to PrevLowMapBuffer[shift]?


another thing is what's the meaning of grey chat icon vs blue chat icon did i do something wrong?

 
Stop double posting.
 

Do not double post.

I have removed your other topic.

 
beee:

hi all, 

the result from the above partial code is PrevLowMapBuffer = 0, LowMapBuffer = 1085 

just wondering why couldn't i assign value to PrevLowMapBuffer[shift]?


another thing is what's the meaning of grey chat icon vs blue chat icon did i do something wrong?

Should you be using [shift] before you are actually in the for loop?...

 
James Hodges:

Should you be using [shift] before you are actually in the for loop?...

shift has its value earlier on in the upper part of the code i don't include here 

since it shows up in the comment value of lowmapbuffer[shift] = 1085 i have relocated the value assignment to prevlowmapbuffer[shift] many places eg. before, in the loop and after the loop and yet it still didn't get the value from lowmapbuffer[shift] 

Reason: