Total damage after hit

Pages: 12
Use code brackets so that it's easier to read your code:


Use these tags:

[code]
//Your Code Here
[/code]



The issue is that you ended the for-loop with a semicolon - that shouldn't be there. You're terminating the loop before it even begins.


EDIT: Also, as Jonnin said, you're using "=" rather than "+=". Look at the loop I posted previously.
Last edited on
he also used a comma in the for loop. it needs a;
the format is
for(init; condition; action)
you have
for(init, condition, action)

for(...); is not a language error: it does nothing many times and then does what follows once.
this is a nasty silent bug, and so commonly done that all good compilers warn you about it.
once it compiles review your warnings and you will see what I mean. Then fix it by removing the ;.

Last edited on
Topic archived. No new replies allowed.
Pages: 12