
Originally Posted by
Le Jingle
Ahh, you teach me a new thing everytime. Not even joking ^.^
I was getting stuck and thought the problem was using the tolerance array, which I'm still figuring out; but I think if you only put one tolerance in the array, it will use that for both colors(?). (I was trying to limit the tolerance array, as well as the min, and then messing with the TBoxArray >.<)
Thanks for the amazing help, again! (sorry for aio :<)
No problem! I'm just doing my part, that's all 
I'll give you a quick little overview of exactly what the function is doing. You're right about this: "but I think if you only put one tolerance in the array, it will use that for both colors", although it goes a little further than that. I'll just use what you posted as an example.
I don't think explaining it with words is the best way to go about this, so I'm just going to give examples and the results.
Simba Code:
WaitColorBox(100, [1710098], [25], [15], [aBox[0]], True);
// ^ Searches the specified box for the color/count/tol and returns true if found.
WaitColorBox(100, [1710098, 1859157], [25], [15], [aBox[0]], True);
// ^ Searches the specified box for both colors with the same count/tol and returns
// true if both are found.
WaitColorBox(100, [1710098, 1859157], [25], [15, 18], [aBox[0]], True);
// ^ Searches the specified box for both colors with their respective tols (but the
// same count) and returns true if both are found.
WaitColorBox(100, [1710098], [25], [15], [aBox[0], aBox[1]], True);
// ^ Searches both boxes for the color/count/tol and returns true if both are found.
WaitColorBox(100, [1710098, 1859157], [25], [15], [aBox[0], aBox[1]], True);
// ^ Searches each box for the respective color (1710098 in aBox[0], 1859157 in aBox[1])
// with the same count/tol and returns true if both are found.
The last parameter, that I've called 'strict', is very important. Setting strict to true will require everything to be found to return true, whereas setting it to false only requires a single color/count to be found to return true.
Simba Code:
WaitColorBox(100, [1710098], [25], [15], [aBox[0], aBox[1]], True);
// ^ Will search both boxes for the specified color/count and only return true if the
// color/count is found in both boxes.
WaitColorBox(100, [1710098], [25], [15], [aBox[0], aBox[1]], False);
// ^ Same as above, except it will return true if the color/count is found in either of
// the boxes.
I don't know how to explain it any better
Just make sure you don't use uneven amounts of parameters (2 colors with 3 tols, stuff like that). I don't know how Simba will handle that, but it definitely won't work! Some people would say that this function is pointless because it can be easily done in other ways, for example:
Simba Code:
if WaitColorWhatever(100, 1710098, 25, 15, aBox[0]) and WaitColorWhatever(100, 1859157, 25, 18, aBox[1]) then
// is the same as:
if WaitColorBox(100, [1710098, 1859157], [25], [15, 18], [aBox[0], aBox[1]], True) then
WaitColorWhatever would have a lot less code and things would look more simple but... where's the fun in that! Striving for complexity and consolidation is striving for success in my book
Well this sort of turned into an odd pep-talk or something so I'm going to wrap it up here before I really veer off course. Anyways, If you need any help feel free to shoot me a PM. Or you can always just post in the help section and I'll find it eventually