Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Scripts failing to execute on first run #32

Closed
GigiaJ opened this issue Mar 30, 2020 · 3 comments
Closed

[BUG] Scripts failing to execute on first run #32

GigiaJ opened this issue Mar 30, 2020 · 3 comments
Assignees
Labels
bug Denotes that this a bug critical urgent or causing complete failure in entire program (crashing or looping) imperative imperitive, needs to be done immediately

Comments

@GigiaJ
Copy link
Collaborator

GigiaJ commented Mar 30, 2020

BEFORE REPORTING
Ensure RuneLite is up to date in IDE and you are using the latest version of the master branch

Describe the bug
Scripts currently aren't executing any code written in them or the getBot function is returning null values.

To Reproduce
Steps to reproduce the behavior:

  1. Create any script with code to be executed.
  2. Watch it fail to do anything.

Expected behavior
It should execute the code. Additionally, at the moment I am uncertain if the issue lies in the scripts themselves or elsewhere

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]

Additional context
Found while attempting to fix #1
Scripts appear to not be able to interact with any given object after getBot() which results in virtually everything written in them failing to run.

@GigiaJ GigiaJ added critical urgent or causing complete failure in entire program (crashing or looping) bug Denotes that this a bug imperative imperitive, needs to be done immediately labels Mar 30, 2020
@GigiaJ GigiaJ self-assigned this Mar 30, 2020
@GigiaJ GigiaJ changed the title [BUG] [BUG] Scripts failing to execute Mar 30, 2020
@vuurman100
Copy link

you only should use bot.getMethodContext() from the runelitetestfeature when loading with runelite.
For scripts use ctx.client, and it should fix the problem

@GigiaJ GigiaJ changed the title [BUG] Scripts failing to execute [BUG] Scripts failing to execute on first run Mar 30, 2020
@GigiaJ
Copy link
Collaborator Author

GigiaJ commented Mar 30, 2020

Thanks for that. I believe it works either way, but doing it that way IS the correct way to prevent errors.
I've found the issue though. When you initialize a script at the login screen the login script goes off and it never escapes so it stays stuck in the loop.

@GigiaJ
Copy link
Collaborator Author

GigiaJ commented Mar 30, 2020

Fixed.

@GigiaJ GigiaJ closed this as completed Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Denotes that this a bug critical urgent or causing complete failure in entire program (crashing or looping) imperative imperitive, needs to be done immediately
Projects
None yet
Development

No branches or pull requests

2 participants