- Joined
- Jan 31, 2016
- Messages
- 5,413
- Thread Author
- #21
Username intellij and follow tutorial for an easy setupHow do i add these .idea,out into my eclipse and what are they?
By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!Username intellij and follow tutorial for an easy setupHow do i add these .idea,out into my eclipse and what are they?
I am going to make a new version of this with the better style . TaskBot and maybe TreeBot alsoThis is appreciated.
Read the error messages.
How do I make a class for a variable? And what info do I put in that class? I tried making a new class for the "Obj" variable but it just gave the same error "Expected to be in a class, interface, or enum."Read the error messages.
For the first one, you tried to make a variable, but it expected it to be in a class, interface, or an enum since variables can't just be in packages only.
For the second one it expected there to be a ")". Look around there for where you're missing one and add it. IntelliJ highlights the errors in the editor so you can find exactly where they are.
The lineHow do I make a class for a variable? And what info do I put in that class? I tried making a new class for the "Obj" variable but it just gave the same error "Expected to be in a class, interface, or enum."
Don't give it awayThe line
public GameObject obj;
should come after the public class line.
On the if(obj.interact line, you are missing an ending ) right parenthesis
How's it giving it away? I don't know how to code yet lolDon't give it away
I may just remove all I posted and redo it as its ugly and bad at explaining, but I'm off to bed atm, later!Wow, this is truly awesome @awesome123man ! I hope you plan to continue adding things to this guide. I just started a Java class and I would love to learn more!
GameObject spot = GameObjects.newQuery().names("Fishing spot").results().nearest();
if (spot != null) {
//trying click here...
System.out.println("click");
} else {
//GETTING NULL HERE
System.out.println("is null");
}
This is always null
Code:GameObject spot = GameObjects.newQuery().names("Fishing spot").results().nearest();
my null checking:
Code:if (spot != null) { //trying click here... System.out.println("click"); } else { //GETTING NULL HERE System.out.println("is null"); }
Any idea to fix this problem?
Well client is currently down in OSRS support, so those may be returning null in OSRS..
You may need to check other types such as Npcs... i'm not sure how fishing spots work. Consider using dev toolkit bot to find out.Ohh sorry, I didn't specified. I'm scripting for RS3.
There are a new method for creating a GameObject for RS3 in Spectre API?
You may need to check other types such as Npcs... i'm not sure how fishing spots work. Consider using dev toolkit bot to find out.
We use essential cookies to make this site work, and optional cookies to enhance your experience.