Jump to content

Why the memory hog? Review my code


LoudPacks

Recommended Posts

if you removed this line:

profit = ((players.getInventory().getItem("coins").getAmount()) + (242 * players.getInventory().getItem("Nature rune").getAmount())) - ((startNats * 242) + startGP);
		
		

does it fix it?

just removed that, it still doesn't.

 

 

EDIT: I fixed it by changing my getState method and changing some loop logic:

	private State getState() {
		
				
		if (mes.contains("treasure"))
		{
			return State.WAIT;
			
		}
		
		
		
		
		return State.STEAL;
		


	}

Edited by Chris1665
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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