The third solution has worked:

While (true)

{

if (instr[EIP] == 1170000000 || instr[EIP] == 1180000000)

Break;

EIP++;

}

cyperrage: you're wrong: if I put && instead of || both of the condition have to be fulfilled, only one have to be fulfilled. Anyway: the same variable can't have two different values at the same time.

Thanks a lot!

Jymmy097

Simply put: No.

Loops work based on the following properties:

1) Whenever the logic inside the parentheses is TRUE, the loop continues.

2) Whenever the logic inside the parentheses is FALSE, the loop breaks.

Let me lay out some Logical operator tables for you. (&& = logical AND, || = logical OR)

A | B | AND | ORFALSE | FALSE | FALSE | FALSE

FALSE | TRUE | FALSE | TRUE

TRUE | FALSE | FALSE | TRUE

TRUE | TRUE | TRUE | TRUE

Right now, you are using OR, therefore, the loop will ONLY break when the FALSE condition comes up, which only happens when both conditions come up false, which is impossible granted your logic. If you use the AND operator, it is obvious to see that when either condition breaks, the loop will break as well.

Also, as stated above, if you change the != to ==, then your logic will work fine, you just have to change either one, != to ==, or || to &&, the logic will be the same regardless, but you must do either one if you want it to be correct.