This looks like uneccessary redundancy; since I have to specify a station before I can specify a ware, the script should assume that the station I entered to specify the ware is also the waypoint.jlehtone wrote:The function actually wants: integer, station, ware, integer, integer.
But to enter "ware", you have to first select something that does list the ware. That is why "ware" looks like "station type, ware".
According to the script write up, the reason for adding 100000 to the ware amount is to force the script to do a comparision calculation between the amount I've asked to be purchased and the amount I already have on board. So if I already have on board the full amount I asked to be purchased, the script should caculate a ware purchase amount of 0, buy 0 zero wares, and continue on to the next waypoint. Thus the 100000 modifier should eliminate any decision making requirement on behalf of the pilot.It is a tough design issue: if you have nothing to do, should you do it anyway, or wait until you can do it?
Had I instead specified an exact amount without adding the modifer, then yes, the pilot simply wouldn't be able to load the specified amount, and would have to determine wether or not to stick around and wait for the station to produce enough wares, or recognize that my freighter can't hold the wares and move on. If the script assigns no default action for either case (wait or move on), at a very minimum the pilot should generate an incomming message rather than go into stanby without saying anything since clearly the standby condition would never be resolved without the player's intercession.
This seems like an artificial limitation in the script and it would severly limit its utility, as this solution:Besides, you never sell more than what you could get from single source.
wastes time, and time is money; and this solution:Perhaps start with "buy at 1, sell to 4, buy at 2, sell to 4" and add the third when the pilot levels up.
directly wastes money.Or have the amounts: 102100, 104200, 106300, -6300.
At the time I entered the list, I didn't want to be bothered with calculating wether or not the M plant storage capacity was high enough that I'd safely load the entire 6300 at the asking price of 18cr. I shouldn't have to do the calculation, since that's the point of using the -100000 modifier: the script is supposed to do it for me. So in the unlikely event that the pilot was able to purchase less than his total freight capacity from amoungst all 3 stations at the price I set, the script wouldn't balk because I told him to sell exactly 6300 beans.(No need to have "at most" on the sale as the ship has at most 6300 after waypoint 3 anyway.)
STEAMING TELADI!!!

You 'scripters' are driving me bonkers!