Jump to content

Local Script not starting


Recommended Posts

Posted

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

Posted
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");
Posted

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");

 

Posted
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...