What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

A profile crashes HB and I can't get it why

Tweety

New Member
Joined
Sep 6, 2013
Messages
317
Reaction score
0
It's a PB AH profile.
The part that crashes HB is this one:
Code:
	<SubRoutine SubRoutineName="Check Bag Slots">
		<If Condition="(int)var3 == (int)Me.FreeBagSlots" IgnoreCanRun="True">
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;No new items.&quot;);" />
			<CustomAction Code="vara4 = 2;" />
		</If>
		<If Condition="(int)var3 != (int)Me.FreeBagSlots" IgnoreCanRun="True">
			<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;Got new items.&quot;);" />
			<CustomAction Code="vara4 = 1;" />
			<StackItemsAction />
		</If>
		<If Condition="vara4 == 1" IgnoreCanRun="True">
			<CallSubRoutine SubRoutineName="PostToAH" />
			<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
			<CallSubRoutine SubRoutineName="WithdrawBank" />
			<CallSubRoutine SubRoutineName="WithdrawBank" />
			<CallSubRoutine SubRoutineName="WithdrawBank" />
			<CallSubRoutine SubRoutineName="Check Bag Slots" />
		</If>
	</SubRoutine>
The triple withdraw is because the bot gets 5-6 items, posts them and then goes to bang to get more while he could've gotten 20 items at ones.
The bot gets items, posts, goes back, gets items, posts, when he runs out of items to get because the max amount on AH is reached he crashes.
I think I have an endless circle there.
However, I've read the code a thousand times - it does not have endless circle IMO.
It checks if we have difference in our free bag slots - if there are posts and runs the subroutine again.
However if there is no difference = we didn't get new items it should just go out of the subroutine.
Here's the whole while that I got:
Code:
  <While Condition="true" IgnoreCanRun="True">
	<If Condition="(HasNewMail || MailCount&gt; 0)" IgnoreCanRun="True">
		<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;There is new mail.&quot;);" />
		<GetMailAction GetMailType="AllItems" ItemID="" CheckNewMail="True" MaxCODAmount="0g0s0c" MinFreeBagSlots="0" AutoFindMailBox="True" Location="0, 0, 0" />
	</If>
    <StackItemsAction />
    
    <If Condition="(bool)var1 &amp;&amp; (bool)Settings[&quot;Cancel Undercut Auctions&quot;]" IgnoreCanRun="True">
      <CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;Checking for undercut auctions.&quot;);" />
      <CancelAuctionAction UseCategory="False" ItemID="0" AutoFindAh="True" MinBuyout="0g0s1c" IgnoreStackSizeBelow="1" />
    </If>
	<CustomAction Code="var1 = false;" />
	
	<CallSubRoutine SubRoutineName="Get mail" />
	<SubRoutine SubRoutineName="Get mail">
		<CustomAction Code="var5 = false;" />
		<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;Checking for new mail.&quot;);" />
		<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
		<If Condition="(!HasNewMail &amp;&amp; MailCount == 0)" IgnoreCanRun="True">
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;NO new mail.&quot;);" />
		</If>
		<If Condition="(HasNewMail || MailCount&gt; 0)" IgnoreCanRun="True">
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;There is new mail.&quot;);" />
			<GetMailAction GetMailType="AllItems" ItemID="" CheckNewMail="True" MaxCODAmount="0g0s0c" MinFreeBagSlots="0" AutoFindMailBox="True" Location="0, 0, 0" />
		</If>
		<If Condition="(int)var3 != (int)Me.FreeBagSlots" IgnoreCanRun="True">
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;Got new items from mail, posting on AH.&quot;);" />
			<StackItemsAction />
			<CallSubRoutine SubRoutineName="PostToAH" />
			<CustomAction Code="var5 = true;" />
		</If>
		<If Condition="(int)var3 == (int)Me.FreeBagSlots" IgnoreCanRun="True">
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;No new items to post on AH.&quot;);" />
		</If>
		<If Condition="(HasNewMail || MailCount &gt; 0) &amp;&amp; (bool)var5" IgnoreCanRun="True">
			<CallSubRoutine SubRoutineName="Get mail" />
		</If>
	</SubRoutine>
  
	
	
	<StackItemsAction />
	<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;Time for Bank.&quot;);" />
	<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
	<CallSubRoutine SubRoutineName="WithdrawBank" />
	<CallSubRoutine SubRoutineName="Check Bag Slots" />
	
	<SubRoutine SubRoutineName="Check Bag Slots">
		<If Condition="(int)var3 == (int)Me.FreeBagSlots" IgnoreCanRun="True">
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;No new items.&quot;);" />
			<CustomAction Code="vara4 = 2;" />
		</If>
		<If Condition="(int)var3 != (int)Me.FreeBagSlots" IgnoreCanRun="True">
			<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
			<CustomAction Code="Log (Colors.Crimson,&quot;AHBuddy: &quot;,Colors.BlanchedAlmond,&quot;Got new items.&quot;);" />
			<CustomAction Code="vara4 = 1;" />
			<StackItemsAction />
		</If>
		<If Condition="vara4 == 1" IgnoreCanRun="True">
			<CallSubRoutine SubRoutineName="PostToAH" />
			<CustomAction Code="var3 = (int)Me.FreeBagSlots;" />
			<CallSubRoutine SubRoutineName="WithdrawBank" />
			<CallSubRoutine SubRoutineName="WithdrawBank" />
			<CallSubRoutine SubRoutineName="WithdrawBank" />
			<CallSubRoutine SubRoutineName="Check Bag Slots" />
		</If>
	</SubRoutine>
	
	<WaitAction Condition="false" Timeout="250000" />
    
  </While>
 
This is the log from the logs folder it ends like this:
Code:
[23:08:50.946 N]PB 1.610: Skipping Borean Leather since 8 items from me are already posted. Max amount is 8
[23:08:51.077 N]AHBuddy: Going to the nearest Guild Bank.
[20:08:50.935 D] PB 1.610: Post If Below MinBuyout:True 
[20:08:50.935 D] PB 1.610: Lowest Buyout on AH: 0g90s0c, My Minimum Bouyout: 3g0s1c
[20:08:50.935 D] PB 1.610: Finished scanning for items
[20:09:08.807 D] InteractDebug:888284948
[20:09:08.862 D] Interact Done:888284948
[23:09:10.005 N]PB 1.610: Queuing server for gbank info
[23:09:14.440 N]PB 1.610: Done withdrawing itemID:3860 from Guild Bank
[23:09:15.418 N]PB 1.610: No items with entry 12363 could be found in gbank
[23:09:15.432 N]PB 1.610: Done withdrawing itemID:12363 from Guild Bank
[23:09:16.461 N]PB 1.610: No items with entry 7910 could be found in gbank
[23:09:16.474 N]PB 1.610: Done withdrawing itemID:7910 from Guild Bank
[23:09:17.419 N]PB 1.610: No items with entry 1705 could be found in gbank
[23:09:17.431 N]PB 1.610: Done withdrawing itemID:1705 from Guild Bank
[23:09:19.249 N]AHBuddy: Going to the nearest Guild Bank.
[20:09:22.650 D] InteractDebug:888296236
[20:09:22.708 D] Interact Done:888296236
[23:09:23.504 N]PB 1.610: Queuing server for gbank info
[23:09:25.825 N]PB 1.610: Done withdrawing itemID:3860 from Guild Bank
[23:09:26.856 N]PB 1.610: No items with entry 12363 could be found in gbank
[23:09:26.870 N]PB 1.610: Done withdrawing itemID:12363 from Guild Bank
[23:09:27.721 N]PB 1.610: No items with entry 7910 could be found in gbank
[23:09:27.731 N]PB 1.610: Done withdrawing itemID:7910 from Guild Bank
[23:09:28.775 N]PB 1.610: No items with entry 1705 could be found in gbank
[23:09:28.789 N]PB 1.610: Done withdrawing itemID:1705 from Guild Bank
[23:09:30.338 N]AHBuddy: Going to the nearest Guild Bank.
[20:09:34.720 D] InteractDebug:888284948
[20:09:34.777 D] Interact Done:888284948
[23:09:36.444 N]PB 1.610: Queuing server for gbank info
[23:09:38.851 N]PB 1.610: No items with entry 12363 could be found in gbank
[23:09:38.862 N]PB 1.610: Done withdrawing itemID:12363 from Guild Bank
[23:09:40.042 N]PB 1.610: No items with entry 7910 could be found in gbank
[23:09:40.056 N]PB 1.610: Done withdrawing itemID:7910 from Guild Bank
[23:09:41.031 N]PB 1.610: No items with entry 1705 could be found in gbank
[23:09:41.049 N]PB 1.610: Done withdrawing itemID:1705 from Guild Bank
It doesn't give any error, it just ends the log when it stops withdrawing, as I expected. However I don't know what exactly is happening, is it an endless circle or what.
 
Back
Top