Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.
public function remove(u:Unit)
    for (var i = 0; i < size; ++i)


The errors are:

1008: variable 'i' has no type declaration
1008: return value for function 'remove' has no type declaration
share|improve this question

closed as off topic by Arcane Engineer, Josh Petrie, Tetrad Nov 11 '11 at 0:42

Questions on Game Development Stack Exchange are expected to relate to game development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

How do I declare the variable "i" and "remove"? –  V.V.T Nov 10 '11 at 20:43
-1, poorly written question and doesn't belong to Game Development. Post it on stackoverflow.com and with more detail. –  r2d2rigo Nov 10 '11 at 20:44
Ok, I will do that ... –  V.V.T Nov 10 '11 at 21:18

1 Answer 1

You have no braces after your for-loop declaration.

public function remove(u:Unit)
     for (var i = 0; i < size; ++i)

Also, perhaps size is not defined.

Please, in future use stackoverflow.com for pure programming type questions such as this.

share|improve this answer
/ To put braces did not work ... How do I declare size? In the future I will put my programming questions on stackoverflow.com, thanks ... –  V.V.T Nov 10 '11 at 21:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.