Hey all!
I need to check 2 statements over and over again, but I have no clue how to make a loop out of it…
[CODE]
mp5s = leftovernet / 250;
pistols = 0;
totalguns = mp5s + pistols;
if (totalguns < document.gcform.gcthugs.value) {
mp5s = mp5s – 1;
pistols = pistols +5;
if (totalguns < document.gcform.gcthugs.value) {
mp5s = mp5s – 1;
pistols = pistols +5;
if (totalguns < document.gcform.gcthugs.value) {
mp5s = mp5s – 1;
pistols = pistols +5;
if (totalguns < document.gcform.gcthugs.value) {
mp5s = mp5s – 1;
pistols = pistols +5;
if (totalguns < document.gcform.gcthugs.value) {
mp5s = mp5s – 1;
pistols = pistols +5;
// AND THIS GOES ON FOREVER π
}
}
}
}
}
gcresultguns.firstChild.nodeValue = mp5s;
gcresultnet.firstChild.nodeValue = pistols;