
Re: MomBot Buy Command - fighter Error
Not sure which version you're using. Since the script will not buy figs if started from the planet prompt (Line: 659)
Line 1123 references two seperate variables (of four, other two are Boolean): $canbuy and $amounttobuy.
$canbuy is taken from the server output when the Ports Menu is displayed. Not likely to be th e problem.
$amounttobuy is likely the culprit. If you added an extra character to the command line. This value/param is tested with the isNumber function at startup but isn't reset to Zero if it fails the numeric test (Line: 1028). You can insert a line after Line 1028 to read:
setVar $amountToBuy 0
Really. that little segment should be coded as:
Code:
Line 1022: setVar $buys FALSE
Line 1023: setVar $canBuy 0
Line 1024: setVar $amountToBuy $parm2
Line 1025: setVar $buyAll FALSE
Line 1026: setVar $totalFigsPurchased 0
Line 1027: isNumber $test $amountToBuy
Line 1028: if ($test <> TRUE)
Line 1029: setVar $buyAll TRUE
Line 1030: setVar $amountToBuy 0
Line 1031: else
Line 1032: if ($amountToBuy <= 0)
Line 1033: setVar $buyAll TRUE
Line 1034: end
Line 1035: end