im now in the procces of making a platform game in jme3
im now making a levelMaker and i’m having some problem with the BinaryExporter/Importer
I implemnted Savable On Class LittleLevelState():
[snippet id=“53”]
this is The WorldNode Class also implemnting Savable:
[snippet id=“54”]
im getting an exception:
java.lang.IllegalAccessException: Class com.jme3.export.SavableClassUtil can not access a member of class AppStates.LittleLevelState with modifiers “public”
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
at java.lang.Class.newInstance0(Class.java:366)
at java.lang.Class.newInstance(Class.java:325)
at com.jme3.export.SavableClassUtil.fromName(SavableClassUtil.java:172)
at com.jme3.export.SavableClassUtil.fromName(SavableClassUtil.java:204)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:330)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:243)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:130)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:271)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:266)
at AppStates.LittleLevelState.loadFromFileToThis(LittleLevelState.java:104)
everytime i try to load:
any suggestion on solutions?
LittleLevelState needs a default constructor with no params: LittleLevelState() { }
line 13 first snippet
:?
Ah so you do have that, I missed it. You also need your LittleLevelState class to be public.
goddamit how could i miss that
thx u very much