botslave 0 Posted September 4, 2017 Hi Guys, For some reason the onPaint override is not being called on my script. https://imgur.com/Rnl063Y Tried both Graphics and Graphics2D Anything I did wrong? Do I need to extend/implement something? Oh and also none of the debug overlays show up for me :| Thanks For some reason the onPaint override is not being called on my script. https://imgur.com/Rnl063Y Tried both Graphics and Graphics2D Anything I did wrong? Do I need to extend/implement something? Oh and also none of the debug overlays show up for me :| Thanks EDIT: Nvm I fixed it - Dont open the client via the jar files in the install location otherwise the java engine stuff doesnt seem to run!
Koschei 147 Posted September 4, 2017 On your on start have you put try { image = ImageIO.read(new URL("http://i.imgur.com/Picuture.png")); } catch (IOException e){ log("Failed to load image."); } Also for your if (image != null){ g.drawImage(image, 7,345, null); } Btw remove the logs before running the script or it will run at like 3 fps
botslave 0 Author Posted September 4, 2017 On your on start have you put try { image = ImageIO.read(new URL("http://i.imgur.com/Picuture.png")); } catch (IOException e){ log("Failed to load image."); } Also for your if (image != null){ g.drawImage(image, 7,345, null); } Btw remove the logs before running the script or it will run at like 3 fps Hey I guess I should have added this snippet, I already loaded the image from the web and that seems to work fine: https://imgur.com/C1gqeKF As for the logs, I will remove them later once I can get the damn thing working lol. It's more like onPaint() isn't being called at all, I dont see the logging in the client console and no image on the screen. Nvm I fixed it - Dont open the client via the jar files in the install location otherwise the java engine stuff doesnt seem to run!
ArmyofDragons 28 Posted September 4, 2017 If you are extending AbstractScript / TaskScript (I believe that is what it's called) -- do not implement PaintListener. I found out that doing that doesn't allow you to call the onPaint() method. The script classes that you use for super-classes already have PaintListener implemented so there is no need to reinvent the wheel on it.
PatDB85 0 Posted September 11, 2017 EDIT: Nvm I fixed it - Dont open the client via the jar files in the install location otherwise the java engine stuff doesnt seem to run! How do you open the client without doing this? I am having the same issue
Koschei 147 Posted September 12, 2017 How do you open the client without doing this? I am having the same issue Open DBLauncher.jar not Client.jar, you download DBLauncher from the website if you can't find it.
PatDB85 0 Posted September 12, 2017 Open DBLauncher.jar not Client.jar, you download DBLauncher from the website if you can't find it. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.