yibster2009 Posted April 28, 2019 Share Posted April 28, 2019 Error:(60, 43) java: incompatible types: org.osbot.rs07.api.model.RS2Object cannot be converted to org.w3c.dom.Entity I get that error when I put this line of code in. Entity Stall = objects.closest("Fruit Stall"); any idea on what is the issue? Quote Link to comment Share on other sites More sharing options...
Night Posted April 28, 2019 Share Posted April 28, 2019 14 minutes ago, yibster2009 said: Error:(60, 43) java: incompatible types: org.osbot.rs07.api.model.RS2Object cannot be converted to org.w3c.dom.Entity I get that error when I put this line of code in. Entity Stall = objects.closest("Fruit Stall"); any idea on what is the issue? You imported the wrong Entity class, make sure to import the one from OSBot. Quote Link to comment Share on other sites More sharing options...
yibster2009 Posted April 28, 2019 Author Share Posted April 28, 2019 (edited) 5 minutes ago, Night said: You imported the wrong Entity class, make sure to import the one from OSBot. how do i import from osbot. I thought I did that because i dont get errors on everything else. if i do npc there are no errors I also have this import org.w3c.dom.Entity; Edited April 28, 2019 by yibster2009 Quote Link to comment Share on other sites More sharing options...
Night Posted April 28, 2019 Share Posted April 28, 2019 2 minutes ago, yibster2009 said: how do i import from osbot. I thought I did that because i dont get errors on everything else. if i do npc there are no errors Well ideally you don't really need to use the Entity class, you should write it more like: RS2Object stall = objects.closets("Fruit stall"); Quote Link to comment Share on other sites More sharing options...
yibster2009 Posted April 28, 2019 Author Share Posted April 28, 2019 1 minute ago, Night said: Well ideally you don't really need to use the Entity class, you should write it more like: RS2Object stall = objects.closets("Fruit stall"); that worked thank you, I looked at one of the tuts in the forums and thats what it had so i went with it Quote Link to comment Share on other sites More sharing options...
Juggles Posted April 28, 2019 Share Posted April 28, 2019 Also make sure you are following java conventions with naming variables. It should be "stall" not "Stall" 1 Quote Link to comment Share on other sites More sharing options...
Imthabawse Posted April 28, 2019 Share Posted April 28, 2019 (edited) 16 hours ago, yibster2009 said: how do i import from osbot. I thought I did that because i dont get errors on everything else. if i do npc there are no errors I also have this import org.w3c.dom.Entity; Entity will work but just make sure you import the osbot one but like @Night said RS2Object will work just fine. For future reference Entity import looks like this - import org.osbot.rs07.api.model.Entity; Edited April 28, 2019 by Imthabawse Quote Link to comment Share on other sites More sharing options...