Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

[ZScript] Something up with For loops?

2 replies · 1,011 views · Started 21 June 2007


ffc script One {
void run() {
for (int i = 0; i<=64; i+=64) {
Screen->ComboD[51+i] = 44;
}
}
}
}
For some reason, this produces one row of Combos and not two.

I don't think it's the for loop. I think its the <= sign. I bet if you change it to i<65 it will work.

I've experienced problems with <= and >= before, but I wasn't sure if it was the comparison operators or my code. Then I forgot to post about it. 😊

ZASM's GOTOLESS would jump if arg1 < arg2, as opposed to GOTOMORE, which jumps if arg1 >= arg2. This bug then trickled down into ZScript.

GOTOLESS now behaves analogously to GOTOMORE.