Wenn du ein Array hast was 50 groß ist und du nur die letzten 20 benutzten willst ist die Abfrage schon richtig.
Noch mal für dich:
for (new i = 0; i < 50; i ++) {
if (i < 30) continue;
BankVariable[i] = 1;
}
BankVariable[30] bis BankVariable[49] wird auf 1 gesetzt
for (new i = 0; i < 50; i ++) {
if (i > 29) continue;
BankVariable[i] = 0;
}
BankVariable[0] bis BankVariable[29] wird auf 1 gesetzt
Bitte sehr, hier ist dein Sinn für diese Abfrage. Wenn du z.B 50 Banken hast und die ersten 30 Typ 0 sind und die letzten 20 Typ 1, MACHT ES EINEN SINN!
Bzw:
for (new i = 0; i < 50; i ++) {
BankVariable[i] = 0;
if (i < 30) continue;
BankVariable[i] = 1;
}