I need to place units on a map. The map has areas where the units cannot go.
Here's my code:
the setup boolean is to see if the gameplay has started or if it's still in setup mode. The numisl variable is the number of MCs where the unit cannot be placed.Code:onClipEvent (mouseDown) { if (setup=true) { for (i2=0; i1 < _root.numisl; i1++;) { if (this.hitTest(_root["land"+i1]._x,_root["land"+i1]._y)) { _root.errmsg="Cannot Place Ships on Islands!"; } else { stopDrag(); } } }
The error I get is "Scene=RandomMapGame, Layer=Boats, Frame=1: Line 17: Unexpected '}' encountered
}"
When I delete that '}' I get this message "Scene=RandomMapGame, Layer=Boats, Frame=1: Line 4: ')' expected
for (i2=0; i1 < _root.numisl; i1++{"
Is there a way around this?




{"
Reply With Quote