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

2023/5/4

I need help publishing my game

SaltyBacon SaltyBacon

2023/5/4

#
if you click on my game, sketchy mechanic, you can see an error on screen whenever you try to load it, but that isnt in the application version. how do i fix it?
SaltyBacon SaltyBacon

2023/5/4

#
Also forgot to say this, but it says class: java.lang.RuntimeException - (JavaScript but the end is cut off
danpost danpost

2023/5/4

#
SaltyBacon wrote...
if you click on my game, sketchy mechanic, you can see an error on screen whenever you try to load it, but that isnt in the application version. how do i fix it? Also forgot to say this, but it says class: java.lang.RuntimeException - (JavaScript but the end is cut off
In your UIText class, try changing all your "null"s to "new Color(0, 0, 0, 0)".
SaltyBacon SaltyBacon

2023/5/5

#
It didn't fix it. do you have any other ideas?
danpost danpost

2023/5/5

#
SaltyBacon wrote...
It didn't fix it. do you have any other ideas?
There is one in your Counter class and one in your HealthCounter class as well. If it does not work after changing those also, you may have to consider loading the music files on the fly, instead of right at the beginning. For example:
public static GreenfootSound bossMusic;

public << Class name here >>()
{
    // ...
    if (bossMusic == null) bossMusic = new GreenfootSound(<< String filename here >>);
    bossMusic.playLoop();
    // ...
}
You would then have to check if the value was null everywhere you try to reference them with, for example:
if (<< Class name here >>.bossMusic != null) bossMusic.stop();
You need to login to post a reply.