-7
\$\begingroup\$
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
\$\endgroup\$
3
  • \$\begingroup\$ How do I declare the variable "i" and "remove"? \$\endgroup\$ Commented Nov 10, 2011 at 20:43
  • 3
    \$\begingroup\$ -1, poorly written question and doesn't belong to Game Development. Post it on stackoverflow.com and with more detail. \$\endgroup\$ Commented Nov 10, 2011 at 20:44
  • \$\begingroup\$ Ok, I will do that ... \$\endgroup\$ Commented Nov 10, 2011 at 21:18

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ / To put braces did not work ... How do I declare size? In the future I will put my programming questions on stackoverflow.com, thanks ... \$\endgroup\$ Commented Nov 10, 2011 at 21:09

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.