BryceTheCoder Posted May 3, 2018 Share Posted May 3, 2018 Hello wanted... Not sure whats going on here. This prints absolutely correct: repeat writeln(inttostr(InvCount(true))); until false; However... when I do something like this: repeat FindOre; writeln(inttostr(InvCount(true))); waitRR(333,666); until (InvCount(true) = 28); It always prints 0. Any ideas??? P.S. if I were to remove the FindOre; it works properly again. MY FindOre procedure contains a color finding: ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.03, 0.38); if FindColorTol(x, y, 4028566, 60, 50, 450, 310, 16) then click on object..... Sooo maybe the colrTolSpeed an ColorMods need to be changed back before checking the InvCount ??? Not sure.... Please help Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted May 3, 2018 Author Share Posted May 3, 2018 Solved the situation, changed the checkit parameter to false; all is well now. Although, I believe that still is a bug. Quote Link to comment Share on other sites More sharing options...
Wanted Posted May 3, 2018 Share Posted May 3, 2018 Does your code reset ColorToleranceSpeed? ColorToleranceSpeed(1); The 'bug' is not with InvCount it is with TabExists/GetCurrentTab which rely on ColorToleranceSpeed 1 not 2. You need reset ColToleranceSpeed immediately after changing it to 2 and using it it with FindColor etc. . If your code is for sure doing (not missing it in an early exit loop or something) this then try adding it to the test script, if it is still doing this then osrs has updated and I need to change the tolerance parameters. If it stops after you reset it then you need to make your code incorporate the reset. This should be done in any function or produce etc. in your entire script when switching from 1 to 2 CTS Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted May 7, 2018 Author Share Posted May 7, 2018 On 5/3/2018 at 2:46 AM, Wanted said: Does your code reset ColorToleranceSpeed? ColorToleranceSpeed(1); The 'bug' is not with InvCount it is with TabExists/GetCurrentTab which rely on ColorToleranceSpeed 1 not 2. You need reset ColToleranceSpeed immediately after changing it to 2 and using it it with FindColor etc. . If your code is for sure doing (not missing it in an early exit loop or something) this then try adding it to the test script, if it is still doing this then osrs has updated and I need to change the tolerance parameters. If it stops after you reset it then you need to make your code incorporate the reset. This should be done in any function or produce etc. in your entire script when switching from 1 to 2 CTS Okay. If those colors needs it set to 1. Then that is the problem. I am using 2. Thanks for the info! Quote Link to comment Share on other sites More sharing options...