Jump to content

Script wont start


Booleans YAY

Recommended Posts

So i've created many scripts before and even some released as well, i stopped making scripts for a bit now i'm back to do some more.

Not really sure what's going on but even when I retry to debug a log info on onstart method no response is taken at all.

Simple af fix.

Edited by Booleans YAY
Link to comment
Share on other sites

private final RS2Object bankBooth = objects.closest("booth");
private final RS2Object fountainObject = objects.closest("Fountain");

Thats where your problem is. You need to set those objects in your code which executes in onLoop. Say the bank method you have, youd need to put the objects.closest("booth") there.

Link to comment
Share on other sites

I'm on my phone so the formatting is a bit weird.

But it looks like at the bottom of your script you have two global variables bankBooth and fountainObject that store the results of calls to objects.closest

If that is the case, that is what is breaking your script. The objects variable will not be initialised before onStart is called, so your script will break.

You should move those variables to onStart or onLoop

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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