March 12, 20178 yr This one video that had client.getInventory but it's not recognized in eclipse. I looked in the API in inventory and I couldn't find anything that had to do with the inventory capacity. Am I retarded?
March 13, 20178 yr Author 5 minutes ago, TrekToop11 said: inventory.isFull() would work I'm getting the error "inventory cannot be resolved or is not a field"
March 13, 20178 yr 3 minutes ago, Tj2907 said: I'm getting the error "inventory cannot be resolved or is not a field" if (getInventory().isFull()) { do stuff... } That not work?
March 13, 20178 yr Author 7 minutes ago, IHB said: if (getInventory().isFull()) { do stuff... } That not work? Okay that works, but in the video he has client.getInventory Will it function the same? Edited March 13, 20178 yr by Tj2907
March 13, 20178 yr 4 minutes ago, Tj2907 said: Okay that works, but in the video he has client.getInventory Will it function the same? Ehh you're probably writing all your code in one class? The guy in the video you're watching is probably using a Task based method of programming which involves using multiple classes and a method provider, he's called it client I guess. In every class he uses client.theMethod, for you just remove the .client before everything you're following.
March 13, 20178 yr 10 minutes ago, Tj2907 said: Okay that works, but in the video he has client.getInventory Will it function the same? thats basically saying " If the inventory is full, do this/these actions " for example if (getInventory().isFull()){ getInventory().dropAll(); } if the inventory is full, drop everything in the inventory. Edited March 13, 20178 yr by TrekToop11 edit for clarification.
March 13, 20178 yr Author 8 minutes ago, IHB said: Ehh you're probably writing all your code in one class? The guy in the video you're watching is probably using a Task based method of programming which involves using multiple classes and a method provider, he's called it client I guess. In every class he uses client.theMethod, for you just remove the .client before everything you're following. 6 minutes ago, TrekToop11 said: thats basically saying " If the inventory is full, do this/these actions " for example if (getInventory().isFull()){ getInventory().dropAll(); } if the inventory is full, drop everything in the inventory. Alright thanks guys! 3 minutes ago, Chris said: dont watch an old video use the API docs http://osbot.org/api I was watching an old video because I am trying to learn how to properly use the API with a video representation because it is easier to learn that way
March 13, 20178 yr Just now, Tj2907 said: Alright thanks guys! You're watching the same draynor chopper video I watched I think? @Chris is right that's very old for OSBot 1 You're better off having a look through the tutorial section on the actual forum https://osbot.org/forum/forum/250-tutorials/
March 13, 20178 yr Author 5 minutes ago, IHB said: You're watching the same draynor chopper video I watched I think? @Chris is right that's very old for OSBot 1 You're better off having a look through the tutorial section on the actual forum https://osbot.org/forum/forum/250-tutorials/ Well I tried to follow by looking at the pictures on some of the forum topics but it was harder for me to understand it all compared to a video. I'm just using the video as like reference I guess to learn to use the API
March 13, 20178 yr client. Is just a name for it. It's to call the OSBOT API In another class basically https://www.google.com/amp/www.javaworld.com/article/2979739/learn-java/java-101-classes-and-objects-in-java.amp.html
March 13, 20178 yr 3 hours ago, Juggles said: client. Is just a name for it. It's to call the OSBOT API In another class basically https://www.google.com/amp/www.javaworld.com/article/2979739/learn-java/java-101-classes-and-objects-in-java.amp.html lol the banter
Create an account or sign in to comment