Jump to content

Why is this causing my onLoop to return?


Recommended Posts

Posted (edited)

Not really sure whats going on, but after I added this snippet the onLoop kept returning and never running my Tasks. It never makes it to 3 in the logger but also never logs "inside"

f6lJRCe.png

 

LxoZrLX.png

 

 

Note: Don't mention the shitty code in this snippet, it's not live, just a hackjob feature I needed for a spot I was at and didn't matter if the interactiong actually succeeded as the player would idle out anyways.

 

Note 2: I'm not even using that feature and have ensured that stopLootName is empty.

Edited by Polymorphism
Posted (edited)

Well the first thing to look into if it never reaches to 3, to look at the first previous statement or make better debug messages.
 

if(first condition) {
  log('first condition');

  ...

  if(still here) {
  	log('still here');
	....
  }
}

In your case since it never reaches to 3, the statement must never be met. So your statement after log 2 needs work.

Edited by Hayase
Posted
22 minutes ago, Hayase said:

Well the first thing to look into if it never reaches to 3, to look at the first previous statement or make better debug messages.
 

In your case since it never reaches to 3, the statement must never be met. So your statement after log 2 needs work.

 

My statements and debug messages are just fine. Also those ghetto debug messages are not nested inside logic statements, just onLoop() -> try-catch

bKsmFys.png

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...