April 28, 20196 yr 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?
April 28, 20196 yr 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.
April 28, 20196 yr Author 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, 20196 yr by yibster2009
April 28, 20196 yr 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");
April 28, 20196 yr Author 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
April 28, 20196 yr Also make sure you are following java conventions with naming variables. It should be "stall" not "Stall"
April 28, 20196 yr 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, 20196 yr by Imthabawse
Create an account or sign in to comment