I assume this is an implementation detail of the script queue - if a script stops, it assumes there was an issue and so terminates the queue? I'm not sure as I have not used this feature, but I am not sure what else you would expect the script to do if it runs out of ammo. If you can configure this queue based on time, perhaps you could run the script for a fixed duration before buying more ammo, such that you know you won't run out?
-Apa