Re: Getting the following error in the EP Haggle 2012a scrip
Oh, by the way, was just wondering if you realized that the truncate command leaves a number with a decimal point and a zero or zero's in the decimal places?
I noticed it because I had written a ship cap script to replace the one I lost with ALL my other scripts in a hard disk crash
(Guess I'll learn to backup better someday, and keep track of the disks
) and I ran into a bit of a shock when I modded it to play around with the Truncate command and see if that helped it work more efficiently - I seem to remember my old ship cap script almost never failing in a single fig wave cap but the one I just wrote has been failing more than I like.
Anyway, first time I used it, I kinda got a shock when it sent like 3800 figs or something to cap the alien and wasted him and gave me a tasty helping of that good ole corbo
So I worked the math on the calculator and it was right except for an extra zero. So, I put in a pause and checked the variables and saw that the shields variable I was using was setting to like 270.0 and the other variables were setting to a decimal place and a zero after being Truncated.
It seems the game doesn't choke when you send it a number with a decimal point and a 0 in the decimal place, it seems to just ignore the decimal point and treat it like 2500 instead of 250.0 or whatever. Just thought I would mention that.
As to the ship cap script, I guess I should post a new topic and ask if anyone else has trouble with single fig wave ship capping. Don't want to take this threat that far off topic lol.