View unanswered posts | View active topics It is currently Thu Apr 30, 2026 8:50 am



Reply to topic  [ 5 posts ] 
 MomBot Buy Command - fighter Error 
Author Message
Corporal

Joined: Tue Jan 22, 2002 3:00 am
Posts: 6
Location: USA
Unread post MomBot Buy Command - fighter Error
it gave me an error for decimal value in line 1123

the fighter amount was 280000 and had 999 mil in credits this was from a citadel prompt in home sector warping to RYLOS. when it terminated I just ran from planet prompt and it bought the fighters ok.

So I am wondering if the error came on this line but really occurred in another place and fell out here.


Tue Jul 15, 2008 2:48 am
Profile ICQ WWW
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post Re: MomBot Buy Command - fighter Error
Mandorallen wrote:
it gave me an error for decimal value in line 1123

the fighter amount was 280000 and had 999 mil in credits this was from a citadel prompt in home sector warping to RYLOS. when it terminated I just ran from planet prompt and it bought the fighters ok.

So I am wondering if the error came on this line but really occurred in another place and fell out here.


As a wild guess, it might be a stripText call is needed prior to line 1123 on the credit variable or figs (something similar to stripText $citCredits "," or stripText $shipFighters ","). I don't use the script so I really don't know, and the var names I used will be wrong.

Good question for LoneStar or Mind Dagger.

_________________
               / Promethius / Enigma / Wolfen /

"A man who has no skills can be taught, a man who has no honor has nothing."


Tue Jul 15, 2008 11:53 am
Profile ICQ
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1402
Location: Canada
Unread post 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

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Tue Jul 15, 2008 1:02 pm
Profile ICQ YIM
Corporal

Joined: Tue Jan 22, 2002 3:00 am
Posts: 6
Location: USA
Unread post Re: MomBot Buy Command - fighter Error
using 3_1031 you just updated the other day..

Let me see if i can recreate it and get the screen and the error at same time.

That is of course if you don't kill me again...:>


Wed Jul 16, 2008 1:46 am
Profile ICQ WWW
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1402
Location: Canada
Unread post Re: MomBot Buy Command - fighter Error
Mandorallen wrote:
using 3_1031 you just updated the other day..

Let me see if i can recreate it and get the screen and the error at same time.

That is of course if you don't kill me again...:>


Laff.. Pad Dock with twice as many ships, or no ships.. end result will always be the same :wink:

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Wed Jul 16, 2008 5:01 am
Profile ICQ YIM
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.