i get the syntax error:
line 13,14,15
ive looked up how to properly declare creating object arrays, but according to what ive read now this should be the correct syntax..
1 | ']' expected |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | public class MyWorld extends World { PC player = new PC(); private int nOfSkulls = 3 ; FloatingSkull skull[] = new FloatingSkull(player)[nOfSkulls]; skull[ 0 ] = new FloatingSkull(); skull[ 1 ] = new FloatingSkull(); skull[ 2 ] = new FloatingSkull(); EnvObj building = new EnvObj(); boolean roomSwitcher; public MyWorld() { super ( 600 , 600 , 1 ); //setPaintOrder(Shadowball.class,Smoke.class); setPaintOrder(FloatingSkull. class , SkullBeam. class , Shadowball. class ,Smoke. class ); addObject(player, 300 , 200 ); addObject(skull1, 20 , 20 ); addObject(skull1, 400 , 400 ); addObject(skull2, 500 , 500 ); } |