aerospacedoor Posted January 29, 2015 Share Posted January 29, 2015 Can some one please explain this red line for me. http://imgur.com/NjzSlnn Link to comment Share on other sites More sharing options...
Extreme Scripts Posted January 29, 2015 Share Posted January 29, 2015 The rocks you are referring to is actually an object of type "RS2Object" The reason it's coming up as a red line is you might not have added the OSBot jar to your build path. 1 Link to comment Share on other sites More sharing options...
aerospacedoor Posted January 29, 2015 Author Share Posted January 29, 2015 The rocks you are referring to is actually an object of type "RS2Object" The reason it's coming up as a red line is you might not have added the OSBot jar to your build path. I am pretty sure that's one of the first things the guide i'm following instructed me to do. Link to comment Share on other sites More sharing options...
Extreme Scripts Posted January 29, 2015 Share Posted January 29, 2015 Might just be deprecated then not too sure haven't ever used Entity. You should use RS2Object. 1 Link to comment Share on other sites More sharing options...
Isolate Posted January 29, 2015 Share Posted January 29, 2015 Did you use the wrong import :') Entity i = objects.closest("lol"); gives no errors to me using the osbot entity import. Oh the picture you posted on the other thread shows that you didnt import entity... plz sir put this at the top: import org.osbot.rs07.api.model.Entity; and remove any other import with the word entity in it. Link to comment Share on other sites More sharing options...
aerospacedoor Posted January 29, 2015 Author Share Posted January 29, 2015 (edited) I fixed the first error but that made another error here. Edited January 29, 2015 by aerospacedoor Link to comment Share on other sites More sharing options...
Isolate Posted January 29, 2015 Share Posted January 29, 2015 at the bottom you before the last bracket you need to add something like return random(lowInt, Highint); //eg return random(250,500); because its an int it needs to return an int in the end and in this case thats the sleep before the script polls again 1 Link to comment Share on other sites More sharing options...
aerospacedoor Posted January 29, 2015 Author Share Posted January 29, 2015 (edited) EDIT** at the bottom you before the last bracket you need to add something like return random(lowInt, Highint); //eg return random(250,500); because its an int it needs to return an int in the end and in this case thats the sleep before the script polls again I thought I had fixed my error until I found this, what does this mean? Edited January 29, 2015 by aerospacedoor Link to comment Share on other sites More sharing options...
Isolate Posted January 29, 2015 Share Posted January 29, 2015 Thank you again you are very help-full . Error fixed, you helped fix my problems but I still don't understand stuff like int needing to return to and int and mostly all of it but I am picking things up slowly. to not: Void Public void myVoid(){ //Do something here and return nothing, just do whats coded } String public String myString(){ //code to figure out what string to return } //eg. public String getName(Item item){ if(item != null){ return item.getName(); } } //which would be called like Item banana = blah blah blah; String bananaName = getName(banana); int public int randomInt(int low, int high){ Random random = new Random(); return random.nextInt((high - low) + 1) + low; } //which if used like int i = randomInt(1,10); //would generate a random number between 1 and 10 inclusive. boolean public boolean isAnimating(){ return myPlayer.getAnimation() != -1; } //which would return true if you're doing anything but walking/standing still doing things like this are a good way of getting what you want but giving you the ability to incorporate alot of factors of your own EDIT** I thought I had fixed my error until I found this, what does this mean? what is red lined? it might just be telling you its an unused import since you called it as an entity, just remove the import line for it and see if its fixed Link to comment Share on other sites More sharing options...
Alek Posted January 29, 2015 Share Posted January 29, 2015 Entity is an interface 3 Link to comment Share on other sites More sharing options...
Joseph Posted January 29, 2015 Share Posted January 29, 2015 It doesn't matter if he uses the entity interface. Just know he probably has the wrong entity Import Link to comment Share on other sites More sharing options...