Dockid 9 Share Posted May 13, 2020 g.drawString("Experience:" + + getSkillTracker().getGainedExperience(Skill.FISHING)+getSkillTracker().getGainedExperiencePerHour(Skill.FISHING) ,9, 430); Skill tracker gained xp and gained xp per hour is just showing 0? anyone know how to fix this because skilltracker is working as the line of code below is working correctly g.drawString("Fishing level: " + getSkillTracker().getStartLevel(Skill.FISHING), 9, 400); Link to comment Share on other sites More sharing options...
Pandemic 2803 Share Posted May 13, 2020 When your script starts, are you starting the skill tracker? getSkillTracker().start(); Link to comment Share on other sites More sharing options...
Dockid 9 Author Share Posted May 14, 2020 Yes I am, X/P hour stays at 0 no matter what happens Link to comment Share on other sites More sharing options...
NovaGTX 106 Share Posted May 14, 2020 2 hours ago, Dockid said: + + You have two plus signs in the line with nothing between them. This will cause an error, but I'm surprised you never saw this. What IDE are you using? Link to comment Share on other sites More sharing options...
Dockid 9 Author Share Posted May 14, 2020 Yeah I spotted that straight after posting, that wasnt the issue though. Using IntelliJ. X/P hour basically shows for a split second everytime I fish then resets to 0 quite confusing. Link to comment Share on other sites More sharing options...
AsBakedAsCake 203 Share Posted May 14, 2020 1 hour ago, Dockid said: Yeah I spotted that straight after posting, that wasnt the issue though. Using IntelliJ. X/P hour basically shows for a split second everytime I fish then resets to 0 quite confusing. Add this to your onStart: getSkillTracker().start(Skill.FISHING); Then proceed to add this to your paint with the correct coordinates: g.drawString("XP Gained(P/H): " + getSkillTracker().getGainedExperience(Skill.FISHING) + "(" + getSkillTracker().getGainedExperiencePerHour(Skill.FISHING) + ")", 0, 0); Link to comment Share on other sites More sharing options...
Dockid 9 Author Share Posted May 14, 2020 2 hours ago, AsBakedAsCake said: Add this to your onStart: getSkillTracker().start(Skill.FISHING); Then proceed to add this to your paint with the correct coordinates: g.drawString("XP Gained(P/H): " + getSkillTracker().getGainedExperience(Skill.FISHING) + "(" + getSkillTracker().getGainedExperiencePerHour(Skill.FISHING) + ")", 0, 0); Yeah when I tried that line of code, i would catch a lobster and for a brief second xp gained would show as 90 and xp/hr quickly shows before both instantly reset to zero Link to comment Share on other sites More sharing options...
AsBakedAsCake 203 Share Posted May 14, 2020 44 minutes ago, Dockid said: Yeah when I tried that line of code, i would catch a lobster and for a brief second xp gained would show as 90 and xp/hr quickly shows before both instantly reset to zero It's a problem with something else in your script then because it works perfect in mine. 🤷♂️ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.