jeudi 21 mai 2015

Arrays einspeichern geht nicht

Hallo erst mal
vielleicht kann mir jemand helfen
ich will n P(p)aar sachen in arrays rein quetschen (unbestimmte anzahl)
Java Code:

  1.  
  2. static int auf = 0;
  3.  
  4. static void add(Node n){
  5. int sz;
  6. if(auf == 0){
  7. sz = 0;
  8. auf++;
  9. }else{
  10. sz = x.length;
  11. }
  12. Logger.Debug("Size " + sz, false);
  13. x[sz] = n.getTranslateX();
  14. z[sz] = n.getTranslateZ();
  15. y[sz] = n.getTranslateY();
  16. hy[sz] = n.getScaleY();
  17. lz[sz] = n.getScaleZ();
  18. bx[sz] = n.getScaleX();
  19. rot[sz] = n.getRotate();
  20. ax[sz] = n.getRotationAxis();
  21. }

ich bekomme diesen Error

[16:00:10 05/21/15]-[Client/Debug]:Size 0
[16:00:10 05/21/15]-[Client/Debug]:In Thread 14 JavaFX Application Thread
[16:00:10 05/21/15]-[Client/Debug]:Exepted by sun.misc.Launcher$AppClassLoader@73d16e93
Exception in Application start method
Exception in thread "Thread-223" java.lang.NullPointerException
at com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMediaPlayer.playerGetPresentationTime(Unknown Source)
at com.sun.media.jfxmediaimpl.NativeMediaPlayer.getPresentationTime(Unknown Source)
at javafx.scene.media.MediaPlayer.getCurrentTime(Unknown Source)
at com.weebly.Blackoutupdate.Blackout.INGAME$5.run(INGAME.java:639)
at java.lang.Thread.run(Unknown Source)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$57/1463801669.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.weebly.Blackoutupdate.Blackout.Berechnung.add(Berechnung.java:18)
at com.weebly.Blackoutupdate.Blackout.Game.register(Game.java:41)
at com.weebly.Blackoutupdate.Blackout.INGAME.newWorld(INGAME.java:695)
at com.weebly.Blackoutupdate.Blackout.INGAME.map(INGAME.java:599)
at com.weebly.Blackoutupdate.Blackout.INGAME.start(INGAME.java:689)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$60/575176754.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$45/237061348.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/494259528.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/1030870354.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$36/1232367853.run(Unknown Source)
... 1 more


Arrays einspeichern geht nicht

0 commentaires:

Enregistrer un commentaire