Beefsteak Posted January 29, 2022 Share Posted January 29, 2022 Hey folks, working on my first OSBot script by translating one of my poopbot scripts... Finally ironed out all the errors, but now when I run the script in OSBot, nothing happens, doesn't start the script. I read on the forums that it might have to do with where I declare my variables, so I moved them all up to the top, but still not working. Please check out my pastebin here: https://pastebin.com/PmmApEB7 and let me know what I can do to fix it! Thanks Quote Link to comment Share on other sites More sharing options...
Gunman Posted January 30, 2022 Share Posted January 30, 2022 5 hours ago, Beefsteak said: Hey folks, working on my first OSBot script by translating one of my poopbot scripts... Finally ironed out all the errors, but now when I run the script in OSBot, nothing happens, doesn't start the script. I read on the forums that it might have to do with where I declare my variables, so I moved them all up to the top, but still not working. Please check out my pastebin here: https://pastebin.com/PmmApEB7 and let me know what I can do to fix it! Thanks Don't do this globally, most likely the cause for it not starting GroundItem loot = groundItems.closest("Bones"); Area near = myPlayer().getArea(3); Object pool = objects.closest("Pool of Refreshment"); Object ditch = objects.closest("Wilderness Ditch"); Quote Link to comment Share on other sites More sharing options...
Beefsteak Posted January 30, 2022 Author Share Posted January 30, 2022 I've tried a few diff things with those declarations but still wont start. How/where would you write it? Thanks for the response. 1 hour ago, Gunman said: Don't do this globally, most likely the cause for it not starting GroundItem loot = groundItems.closest("Bones"); Area near = myPlayer().getArea(3); Object pool = objects.closest("Pool of Refreshment"); Object ditch = objects.closest("Wilderness Ditch"); Quote Link to comment Share on other sites More sharing options...
Gunman Posted January 30, 2022 Share Posted January 30, 2022 2 hours ago, Beefsteak said: I've tried a few diff things with those declarations but still wont start. How/where would you write it? Thanks for the response. Doesn't even look like you use them, might of missed it, but I would just remove them Quote Link to comment Share on other sites More sharing options...
Beefsteak Posted January 31, 2022 Author Share Posted January 31, 2022 16 hours ago, Gunman said: Doesn't even look like you use them, might of missed it, but I would just remove them Tried removing all the variables and still not starting. Any other ideas? Thanks Quote Link to comment Share on other sites More sharing options...
Gunman Posted January 31, 2022 Share Posted January 31, 2022 8 hours ago, Beefsteak said: Tried removing all the variables and still not starting. Any other ideas? Thanks Start commenting out blocks of code until it starts, then once it starts leave the last block of code commented out and start uncommenting the other blocks of code step by step and see if there's any other code causing issues Quote Link to comment Share on other sites More sharing options...