Maxo Posted October 12, 2022 Share Posted October 12, 2022 My firemaking scripts sporadically walks into the problem where it's having null selected somehow. i tried resolving this with the following, but this doesn't seem to resolve the issue. Does anyone know how to prevent this? if (logAmount >= 1) { api.inventory.interact("Use", Main.Logs); if (!api.getInventory().isItemSelected()) { api.getInventory().deselectItem(); } api.inventory.interact("Use", "Tinderbox"); } Would this prevent it maybe? api.inventory.interact("Use", Main.Logs); if (api.getInventory().getSelectedItemName() == null) { api.getInventory().deselectItem(); } api.inventory.interact("Use", "Tinderbox"); Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted October 12, 2022 Share Posted October 12, 2022 (edited) It's in fact just a jagex thing ^^ It happends if you select an item and it disappears, due to burning in your case Just null check the selected item name Edited October 12, 2022 by Khaleesi Quote Link to comment Share on other sites More sharing options...
FushigiBot Posted October 12, 2022 Share Posted October 12, 2022 This may happen when the bot selects the log that is already queued to be burned, and then it disappears. Eg. selecting too quickly. 1 Quote Link to comment Share on other sites More sharing options...