veeniqqa 2 Share Posted June 7, 2016 Im using the following code to withdraw tunas. if(getBank().contains(food) && !getInventory().contains(food)){ getBank().withdraw("Tuna", 15); sleepUntil(() -> getInventory().count(foodString) == 15 Calculations.random(42000,523000)); counter = 0; } And it just stops the script, not sure what im doing wrong? Edit: fixed turns out my variables weren't setting correctly. Link to comment Share on other sites More sharing options...
Mad 86 Share Posted June 7, 2016 Is that sleepUntil correct? cuz that wouldn't even compile Link to comment Share on other sites More sharing options...
veeniqqa 2 Author Share Posted June 7, 2016 Is that sleepUntil correct? cuz that wouldn't even compile Yeah should do? gonna test with different sleep then Edit: Not the sleep Link to comment Share on other sites More sharing options...
Stormscythe 263 Share Posted June 7, 2016 You seem to be missing a comma in your sleep. The correct sleepUntil() syntax is: sleepUntil(() condition, sleepLength); You forgot the comma between the condition and the length in your example Link to comment Share on other sites More sharing options...
veeniqqa 2 Author Share Posted June 7, 2016 Okay thats just a copy and paste error. Link to comment Share on other sites More sharing options...
Stormscythe 263 Share Posted June 7, 2016 Okay thats just a copy and paste error. Another thing I noticed is that you check if the bank contains whatever is in the "food" variable, you withdraw "Tuna" and you sleepUntil inventory contains "foodstring" - does all those variables match up to "Tuna"? I'd suggest using the same variable throughout the entire process, to avoid situations where a variable is set wrong. Link to comment Share on other sites More sharing options...
Mad 86 Share Posted June 7, 2016 Another thing I noticed is that you check if the bank contains whatever is in the "food" variable, you withdraw "Tuna" and you sleepUntil inventory contains "foodstring" - does all those variables match up to "Tuna"? I'd suggest using the same variable throughout the entire process, to avoid situations where a variable is set wrong. That was my first thought, the condition was false so it was sleeping that enormous timeout period Link to comment Share on other sites More sharing options...
veeniqqa 2 Author Share Posted June 7, 2016 I have even tried uaing Sleeop(750,1250) Still did the exact same thing Link to comment Share on other sites More sharing options...
Pandemic 2498 Share Posted June 7, 2016 Debug it line by line and print what's not working Link to comment Share on other sites More sharing options...
Hopewelljnj 46 Share Posted June 7, 2016 If you still can't figure it out try running dreambot through cmd to see if it can tell you where the error is. Start > Run > cmd java -jar C:/Users/%username%/DreamBot/BotData/client.jar Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.