In FFC editor, under Arguments Tab:
Select any argument, D0 through D7,
Enter a value greater than 32768 (I used 93939, but any value should work)
Select OK
Return to editor; argument is now fixed at 32768
Only noticed this one because I happened to be passing a combo number as the argument, and those go up to values of 65xxx or so.
That's not really a bug, but more of a limitation. Until they implement doubles into ZScript (hopefully), I don't think you can have values higher than 32768.
CaRmAgE wrote:That's not really a bug, but more of a limitation. Until they implement doubles into ZScript (hopefully), I don't think you can have values higher than 32768.
I did implement doubles into the scripting engine. In fact, the original version of the engine used doubles. The reason they were changed to fixed point longs is because doubles, as implemented by your average computer, aren't precise enough for some of the stuff people use FFCs for.
The FFC values are stored as long integers with 4 decimal precision. The value 35 would be stored as 350000 by ZC, which is interpreted as 35.0000. The value -10.9 would be stored as -109000. The value 32768 is stored as 327680000. The maximum signed value of a long is about 2.1 billion, so technically we could increase the limit to about 210000, although I'm not sure what such a huge value would be used for.
Also note that I'm pretty sure that this limit only applies to actual FFC parameters (position, arguments, etc). The actual values as used by scripts can go as high as ~210000 either way, although thinking about it I don't actually think we put error checking in case someone tried to use something higher. Something to look at in a bit.
Ah, OK. I understand now.
jman2050 wrote:The FFC values are stored as long integers with 4 decimal precision. The value 35 would be stored as 350000 by ZC, which is interpreted as 35.0000. The value -10.9 would be stored as -109000. The value 32768 is stored as 327680000. The maximum signed value of a long is about 2.1 billion, so technically we could increase the limit to about 210000, although I'm not sure what such a huge value would be used for.
Well, there may well be something. Fixed.
P.S: Combo IDs go up to 65519!