Posted: Tue Feb 08, 2022 1:39 pm Post subject: How do you check or filter invalid floats in lua?
I tried to search for this answer. But I'm not sure I know what to look or ask for.
So I'm doing an aobsan to locate my Values. This works great when you transition from one area to the next. Normally the float value I'm checking for is between 180 and -180. When you go to the next area the float value becomes something like 1.81837043E-38. How do I check for this invalid float so that I can trigger a new aobsan in lua. Thanks for any help given.
That isn't an invalid float value- it's a little more than 0, which is between -180 and 180.
I guess you could make a timer that periodically checks the float and runs some code if it's between 0 and some small positive number, but have you considered better alternatives?
Performing an aobscan for mutable data has always been an awful idea IMO. It's better to use code injection (search "injection copy") or find a pointer. _________________
I don't know where I'm going, but I'll figure it out when I get there.
I ended up monitoring a string that was always in the same location from value I was using. Whenever you transition to a new area. This string blanks out and so then I just trigger a new aobscan when this happens.
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 vote in polls in this forum You cannot attach files in this forum You can download files in this forum