Jump to content

Featured Replies

Posted
comment_16957

Anyone know what this error mean?

 

	OS Royale(v4) is now starting up...
3 2
Client update required!
Exception in thread "Thread-3" java.lang.StringIndexOutOfBoundsException: String index out of range: -63
    at java.lang.String.substring(Unknown Source)
    at com.osroyale.updater.Updater.checkForUpdates(Updater.java:86)
    at com.osroyale.Client.processGameLoop(Client.java:3256)
    at com.osroyale.GameApplet.run(GameApplet.java:216)
    at com.osroyale.Client.run(Client.java:5569)
    at java.lang.Thread.run(Unknown Source)

 

 

Untitled.png
free upload no registration

Edited by Zotic

  • Author
comment_16963
2 hours ago, Madara said:

Line 86 of Updater.   You need to post code or we can not help you.

 

      

 public void checkForUpdates() {
        Client client = Client.instance;
        if (checkClientUpdates()) {
            UpdateComponent screen = new ClientUpdateScreen();
            client.updaterRenderer.setScreen(screen);
                try {
                final String path = getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
                updateClient(path.substring(path.lastIndexOf("/") + 1, path.indexOf(".jar")), screen);
            } catch (URISyntaxException e) {
                e.printStackTrace();
            }
        } else if (checkCacheUpdate()) {
            UpdateComponent screen = new CacheUpdateScreen();
            client.updaterRenderer.setScreen(screen);
            try {
                updateCache(screen);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        finish();
    }

This is the line 86 shown

updateClient(path.substring(path.lastIndexOf("/") + 1, path.indexOf(".jar")), screen);

 

Edited by Zotic

comment_16964
48 minutes ago, Zotic said:

 

      


 public void checkForUpdates() {
        Client client = Client.instance;
        if (checkClientUpdates()) {
            UpdateComponent screen = new ClientUpdateScreen();
            client.updaterRenderer.setScreen(screen);
                try {
                final String path = getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
                updateClient(path.substring(path.lastIndexOf("/") + 1, path.indexOf(".jar")), screen);
            } catch (URISyntaxException e) {
                e.printStackTrace();
            }
        } else if (checkCacheUpdate()) {
            UpdateComponent screen = new CacheUpdateScreen();
            client.updaterRenderer.setScreen(screen);
            try {
                updateCache(screen);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        finish();
    }

This is the line 86 shown

updateClient(path.substring(path.lastIndexOf("/") + 1, path.indexOf(".jar")), screen);

 

It cant find your file.

  • Author
comment_16968
9 minutes ago, Madara said:

Check your paths to make sure they work. Ex: where you uploaded your version.txt to let the client know whether or not to update. 

Untitled.png

 

I have added this path to load the client bar, icon, hover etc. but still not working.

  • Author
comment_16970
9 minutes ago, Madara said:

What am i even looking at?! That shows me nothing.. the images are loaded in the code, not by some buildpath.

im using this source.

you can take a look when i run the client from there.

  • Author
comment_16977
12 minutes ago, Madara said:

HAve you added Gradle plugin and imported as a gradle project?

i did. the server source work fine. for client only having issue. i add gradle on client and it showing me that error.

 

i reinstall eclipse, re-download the server and client.. when i run the client it show me client frame say "Hello" few minute later it showing me "Request client file...". and this error from eclipse.

 

OS Royale(v4) is now starting up...
3 2
Client update required!
Exception in thread "Thread-3" java.lang.StringIndexOutOfBoundsException: String index out of range: -63
    at java.lang.String.substring(Unknown Source)
    at com.osroyale.updater.Updater.checkForUpdates(Updater.java:86)
    at com.osroyale.Client.processGameLoop(Client.java:3256)
    at com.osroyale.GameApplet.run(GameApplet.java:216)
    at com.osroyale.Client.run(Client.java:5569)
    at java.lang.Thread.run(Unknown Source)

 

I only add gradle on the client. did not touch other thing,

Edited by Zotic

Create an account or sign in to comment