Posted January 27, 20187 yr 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) free upload no registration Edited January 27, 20187 yr by Zotic
January 27, 20187 yr 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 January 27, 20187 yr by Zotic
January 27, 20187 yr 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.
January 27, 20187 yr Author comment_16965 4 minutes ago, Madara said: It cant find your file. Yea, i been like 3 hour trying to solve it but cant. do you know any idea to solve it?
January 27, 20187 yr comment_16967 33 minutes ago, Zotic said: Yea, i been like 3 hour trying to solve it but cant. do you know any idea to solve it? 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.
January 27, 20187 yr 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. I have added this path to load the client bar, icon, hover etc. but still not working.
January 27, 20187 yr comment_16969 12 minutes ago, Zotic said: I have added this path to load the client bar, icon, hover etc. but still not working. What am i even looking at?! That shows me nothing.. the images are loaded in the code, not by some buildpath.
January 27, 20187 yr 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.
January 27, 20187 yr comment_16972 5 minutes ago, Zotic said: im using this source. you can take a look when i run the client from there. Yes i know what source you are using... I loaded it into eclipse in minutes and it runs fine.
January 27, 20187 yr Author comment_16975 14 minutes ago, Madara said: Yes i know what source you are using... I loaded it into eclipse in minutes and it runs fine. is it my eclipse not working or my jdk. dam i need to reinstall them.
January 27, 20187 yr comment_16976 1 minute ago, Zotic said: is it my eclipse not working or my jdk. dam i need to reinstall them. HAve you added Gradle plugin and imported as a gradle project?
January 27, 20187 yr 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 January 27, 20187 yr by Zotic
Create an account or sign in to comment