Zotic 2 Posted January 27, 2018 Report Share Posted January 27, 2018 (edited) 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) This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up Edited January 27, 2018 by Zotic Link to comment Share on other sites More sharing options...
Madara 767 Posted January 27, 2018 Report Share Posted January 27, 2018 Line 86 of Updater. You need to post code or we can not help you. Link to comment Share on other sites More sharing options...
Zotic 2 Posted January 27, 2018 Author Report Share Posted January 27, 2018 (edited) 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, 2018 by Zotic Link to comment Share on other sites More sharing options...
Madara 767 Posted January 27, 2018 Report Share Posted January 27, 2018 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. Link to comment Share on other sites More sharing options...
Zotic 2 Posted January 27, 2018 Author Report Share Posted January 27, 2018 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? Link to comment Share on other sites More sharing options...
Madara 767 Posted January 27, 2018 Report Share Posted January 27, 2018 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. Link to comment Share on other sites More sharing options...
Zotic 2 Posted January 27, 2018 Author Report Share Posted January 27, 2018 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. This is the hidden content, please Sign In or Sign Up I have added this path to load the client bar, icon, hover etc. but still not working. Link to comment Share on other sites More sharing options...
Madara 767 Posted January 27, 2018 Report Share Posted January 27, 2018 12 minutes ago, Zotic said: This is the hidden content, please Sign In or Sign Up 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. Link to comment Share on other sites More sharing options...
Zotic 2 Posted January 27, 2018 Author Report Share Posted January 27, 2018 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. Link to comment Share on other sites More sharing options...
Madara 767 Posted January 27, 2018 Report Share Posted January 27, 2018 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. Link to comment Share on other sites More sharing options...
Zotic 2 Posted January 27, 2018 Author Report Share Posted January 27, 2018 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. Link to comment Share on other sites More sharing options...
Madara 767 Posted January 27, 2018 Report Share Posted January 27, 2018 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? Link to comment Share on other sites More sharing options...
Zotic 2 Posted January 27, 2018 Author Report Share Posted January 27, 2018 (edited) 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, 2018 by Zotic Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now