Support Board
Date/Time: Sat, 01 Mar 2025 01:54:32 +0000
Post From: Chart replay - order ID returned from future?
[2021-09-07 15:01:30] |
jwick - Posts: 142 |
Arrrgghhhh I might? have figured it out ... I think the issue is with that last line ... For instance, when the InternalOrderID is 17557725, printing "%f", (float)order.InternalOrderID yields 17557724.000000! Which surprises me since I've been careful going from a float to an int in case of situations like .000001 or .99999 but an int to a float (assuming its not an overflow situation)? I'm not 100% sure this is the issue but I noticed this after adding various logging at different locations. Will keep investigating / confirm EDIT: If I test a simple print: "%d as int vs %f as float", 17557725, (float)17557725 ... indeed I get 17557725 and 17557724.000000. Looks like this explains why: https://stackoverflow.com/questions/28325738/why-does-a-cast-from-int-to-float-round-the-value. Would I be able to store InternalID's in subgraph arrays or do I have to use a persistent int / pointer? EDIT2: Yep looks like switching over to storing ID's in a persistent int fixed things. It would be nice to still be able to display internal order ID's in the chart values window but it's not too big of a deal since I know the actual order id might be a few ID's above / below what is displayed in a subgraph. Thanks Date Time Of Last Edit: 2021-09-07 18:56:48
|