This site requires JavaScript, please enable it in your browser!
Greenfoot back
Zaraki
Zaraki wrote ...

2013/2/26

Need Help Please. When i compile this it will say not a statement.

Zaraki Zaraki

2013/2/26

#
if (Greenfoot.isKeyDown("Space")) { if (upgraded == true) { if (shootLimiter > 30) { shootLimiter = 0; Bullet1 11 = new Bullet1(); Bullet2 12 = new Bullet2(); Bullet3 13 = new Bullet3(); getWorld().addObject(11, getX(), getY()-30); getWorld().addObject(12, getX(), getY()-30); getWorld().addObject(13, getX(), getY()-30); } } else if (shootLimiter > 16) { shootLimiter = 0; Bullet = new Bullet(); getWorld().addObject(1, getX(), getY()-30); } } } }
danpost danpost

2013/2/26

#
One thing is that by naming your bullet objects with numbers, you are probably confusing the compiler (naming convension has variable names start with lowercase letters only). Another is that you do no have a field name for the bullet created in the else portion of the code.
You need to login to post a reply.