> I am making a game, the error is that in the "d" loop (for...) the
> value "holeBalls" stays always the same.
It will remain the same because you never update it in the loop and always use it to perform the bound check.
Maybe something like this:
for (d=holeNum;d<=holeBalls;d++)
{
var elem = document.getElementById('hole'+d);
elem.value++;
holeBalls = elem.value;
}
If not this, then maybe you should give us some live working version of the game so that we can understand your predicament.
Last edited by ~s.o.s~; Jul 2nd, 2007 at 6:08 am.
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
Offline 8,873 posts
since Jun 2006