September 15, 20178 yr Hi, i'm coding my script and it's not finding objects. Refer to picture below. Maybe bad code? Idk but using this line to check if an object nearby has always worked in the past. I added some debugging because I wanted to make sure but in the top left you'll see 9348 is being called a null even though you can see (through Entity hover debug) there is a 9348 object right there (Bird snare with Tropical wagtail in it) What's going on?
September 15, 20178 yr 37 minutes ago, Project said: Would try to help if I could understand the logic. Same. Edit: figured it out. I think i was having similar issues yesterday. Most Players with spaces in their name were ==null for some reason even if they existed. Maybe it has something to do with spaces NPCs Objects and Players Edited September 15, 20178 yr by Juggles
September 16, 20178 yr Author On 9/14/2017 at 9:17 PM, Juggles said: Same. Edit: figured it out. I think i was having similar issues yesterday. Most Players with spaces in their name were ==null for some reason even if they existed. Maybe it has something to do with spaces NPCs Objects and Players So how do we correct the issue? Does OSBot's API recognize underscores in place of spaces?
September 16, 20178 yr 5 minutes ago, TTScripts said: So how do we correct the issue? Does OSBot's API recognize underscores in place of spaces? Access entities via getAll() methods instead of closest() and process the collection until you obtain the desired result
September 16, 20178 yr Author Just now, Token said: Access entities via getAll() methods instead of closest() and process the collection until you obtain the desired result Not a bad idea bro, i'll try it!
Create an account or sign in to comment