I am using this loop to go through my database, and check if players Club field matches the clubAway variable. At if statement it "goes berzerk".
Baza = dataset
Players = table in database
Club = int field
int clubAway
I've checked the values with messagebox, and it says for example: Club = 1 and IDclub = 2.. But it enters the if statement anyway. I have exactly the same for loop, with difference that clubAway is clubHome and it works fine.
for (int o = 0; o <= 10; o++)
{
for (int p = 1; p <= Baza.Players.Count; p++)
{
if (Baza.Players[p - 1 + o].Club == clubAway.IDclub)
{//do something
}
}
}
p - 1 + ocan certainly be out of the range ofBaza.Players.Baza.Players[p++]or something witho++in the watch window as these will change the values when stepping through code.ovariable? A little clarification there, and I can probably help you.