Error loading particle

Anything libgdx related goes here!

Error loading particle

Postby xpdt » Thu May 16, 2019 1:13 am

I created a particle by Particle Editor. But error occurs while loading.
Code: Select all
        ParticleEffect particleEffect = new ParticleEffect();
        particleEffect.load(Gdx.files.internal("particles/star.pe"), myAtlas);


Error:
Code: Select all
Exception in thread "LWJGL Application" java.lang.RuntimeException: Error parsing emitter: fart
   at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1160)
   at com.badlogic.gdx.graphics.g2d.ParticleEmitter.<init>(ParticleEmitter.java:103)
   at com.badlogic.gdx.graphics.g2d.ParticleEffect.newEmitter(ParticleEffect.java:227)
   at com.badlogic.gdx.graphics.g2d.ParticleEffect.loadEmitters(ParticleEffect.java:173)
   at com.badlogic.gdx.graphics.g2d.ParticleEffect.load(ParticleEffect.java:162)
   at com.badlogic.gdx.graphics.g2d.ParticleEffect.load(ParticleEffect.java:158)
   at ir.saragames.fastfood.mainScreen.MainStage.<init>(MainStage.java:73)
   at ir.saragames.fastfood.mainScreen.MainScreen.<init>(MainScreen.java:15)
   at ir.saragames.fastfood.SplashScreen.SplashScreen$1$1.run(SplashScreen.java:45)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.executeRunnables(LwjglApplication.java:259)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:210)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
Caused by: java.lang.IllegalArgumentException: No enum constant com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape.false
   at java.lang.Enum.valueOf(Enum.java:238)
   at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShape.valueOf(ParticleEmitter.java:1637)
   at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShapeValue.load(ParticleEmitter.java:1622)
   at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1107)
   ... 11 more
xpdt
 
Posts: 64
Joined: Mon Jul 04, 2016 2:29 am

Re: Error loading particle

Postby shatterblast » Thu May 16, 2019 2:14 am

xpdt wrote:
Code: Select all
Error parsing emitter: fart

Do not take in any sudden deep breaths? Evacuate the area in classic Chinese Fire Drill style?

https://youtu.be/ysimvJTkoWk
shatterblast
 
Posts: 289
Joined: Sun Jul 06, 2014 1:14 pm

Re: Error loading particle

Postby xpdt » Thu May 16, 2019 10:39 am

I downloaded this file from the Internet and edited it. my English is not good :)
Why error parsing? I did not edit the file manually.
xpdt
 
Posts: 64
Joined: Mon Jul 04, 2016 2:29 am

Re: Error loading particle

Postby evilentity » Thu May 16, 2019 11:50 am

Editor version didnt match gdx version.
Looking for a freelancer? PM me!
Check out libgdx discord server!
evilentity
 
Posts: 4767
Joined: Wed Aug 24, 2011 11:37 am

Re: Error loading particle

Postby obigu » Thu May 16, 2019 12:16 pm

@evilentity is right. Download latest 2D Particle Editor, open your particle effects files and Save again to make them compatible with latest libGDX version.
obigu
 
Posts: 130
Joined: Fri Aug 02, 2013 4:47 pm

Re: Error loading particle

Postby xpdt » Thu May 16, 2019 3:31 pm

obigu wrote:@evilentity is right. Download latest 2D Particle Editor, open your particle effects files and Save again to make them compatible with latest libGDX version.

evilentity wrote:Editor version didnt match gdx version.

My gdx is 1.9.8 and Particle Editor is last version. I test the default particle effect(fire) But the same error occurs!
xpdt
 
Posts: 64
Joined: Mon Jul 04, 2016 2:29 am

Re: Error loading particle

Postby evilentity » Thu May 16, 2019 4:15 pm

1.9.8 is not the latest version. Run the editor from ide so you are sure that it matches whatever you are using for the game.
You can do something like this or run the main directly if you prefer.
Code: Select all
public class ParticleEditorLauncher {
    public static void main (String[] arg) {
        ParticleEditor.main(arg);
    }
}

Requires 'compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"' dependency. You can add it to desktop subproject or make new one if you prefer.
Looking for a freelancer? PM me!
Check out libgdx discord server!
evilentity
 
Posts: 4767
Joined: Wed Aug 24, 2011 11:37 am

Re: Error loading particle

Postby xpdt » Thu May 16, 2019 7:13 pm

Thanks evilentity :)
xpdt
 
Posts: 64
Joined: Mon Jul 04, 2016 2:29 am


Return to Libgdx

Who is online

Users browsing this forum: Google [Bot] and 1 guest