BloodRush20 Posted August 31, 2014 Share Posted August 31, 2014 Once I load up the latest jar all i constantly get is a message telling me that I cant make static references when i'm just using a method from the regular api. I get these errors constantly and they wont go away. I've seen others who wrote their code the same way so why am i getting the errors using eclipse btw set up as it should. Link to comment Share on other sites More sharing options...
Extreme Scripts Posted August 31, 2014 Share Posted August 31, 2014 Post a snippet of the code in question with the relevant stack trace and we can try debug it for you. 1 Link to comment Share on other sites More sharing options...
FrostBug Posted August 31, 2014 Share Posted August 31, 2014 It sounds like you're using non-static API methods in static context. This would imply doing something like this: Inventory.getItems() rather than the correct approach using an instance of the Inventory class getInventory().getItems() NOTE: That is if the current class inherits from a MethodProvider, which the Script class does. Link to comment Share on other sites More sharing options...
BloodRush20 Posted August 31, 2014 Author Share Posted August 31, 2014 (edited) Post a snippet of the code in question with the relevant stack trace and we can try debug it for you. startExp = Skills.getExperience(Skill.MAGIC); Mouse.click(true); Bank.open(); Here are some small examples all pulling the same static error I didnt know calling the bank open method could be a static method. Or I have picked up bad habits from other api's i've used. Frost I didnt know there was such a difference in the wording there I never saw the getinventory only the inventory itself in the api. Also while im here is there a equivlent to Game in you api such as Game.logout(false); Edited August 31, 2014 by BloodRush20 Link to comment Share on other sites More sharing options...
Dog_ Posted August 31, 2014 Share Posted August 31, 2014 startExp = Skills.getExperience(Skill.MAGIC); Mouse.click(true); Bank.open(); Here are some small examples all pulling the same static error I didnt know calling the bank open method could be a static method. Or I have picked up bad habits from other api's i've used. Frost I didnt know there was such a difference in the wording there I never saw the getinventory only the inventory itself in the api. Also while im here is there a equivlent to Game in you api such as Game.logout(false); The api is not static. Link to comment Share on other sites More sharing options...
BloodRush20 Posted September 1, 2014 Author Share Posted September 1, 2014 The api is not static. well f me I feel so stupid for this ty guys Link to comment Share on other sites More sharing options...
FrostBug Posted September 1, 2014 Share Posted September 1, 2014 Have a look at the MethodProvider class. Script inherits from it Link to comment Share on other sites More sharing options...