are you saying that it will only open when it sees enough items but it only sucks one stack?
Correct. I wanted my toll to only take what is available only if the amount is correct.
maybe you should try a hungry toll? I.e. you take items and count them as you take them (instead of counting them and then trying to take all of them)
That make sense…. I'll consider it as maybe an option in my config.
So is there any way to fix the toll only taking one stack?
I tried changing the code that counts through if amount less than toll to this:
elseif (val < toll) and (topay > 0 ) and (val > 0) then
print("Counting pennies")
if chest.pushItem(pushdir,key,1) then
topay=topay-1
end
print("Amount left to pay: ",topay)
if topay < 0 then
print("Oops! something went wrong and chest was overcharged!")
end
end
But this is terribly inefficient. in the case of toll = 96, it took about 8 seconds to count through
but i do know that the problem lies somewhere between line 120 and 126 in my pastebin.
Ill edit my post if I find a fix but right now its driving me nuts.
Also I hate leaving stuff unfinished. Being the sort of person I am. Knowing that I'm not there yet but it's so close to in my grasp is enough to make me go till its all fixed. ahh good times XD.
are there many people on this forum like me? :)/>
EDIT: [solved]
Turns out I needed a secondary check.
Pastebin Updated
BTW: This is stable release #1, I will post this once i have finalized a few details like an auto updater