My guess is that somehow this is what is returned when it fails to find a noncollidingposition (I changed the max perimeter to be 1000 and didn't see it again after multiple tests)...I think it would be preferable if it returned nil when it fails
[0.9.6] Scripting, findnoncollidingposition returns 1.7e+308
[0.9.6] Scripting, findnoncollidingposition returns 1.7e+308
I was just using findnoncollidingposition with a maxperimeter of 30 to create an entity at a random location and on occasion found it returning {x=1.7976931348623e+308, y=1.7976931348623e+308}...I also (due to a debug statement) found myself teleported to that 'position' and saw a couple interesting effects (no character and a blinking screen, or maybe that was just the zoom going crazy, I couldn't control that either) 
My guess is that somehow this is what is returned when it fails to find a noncollidingposition (I changed the max perimeter to be 1000 and didn't see it again after multiple tests)...I think it would be preferable if it returned nil when it fails
My guess is that somehow this is what is returned when it fails to find a noncollidingposition (I changed the max perimeter to be 1000 and didn't see it again after multiple tests)...I think it would be preferable if it returned nil when it fails
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: [0.9.6] Scripting, findnoncollidingposition returns 1.7e
This is an side effect, of us using the std::numeric_limits<double>::max() coordinates for emptyPosition internally ...
I will fix it, so it will return nil when the position wasn't found.
I will fix it, so it will return nil when the position wasn't found.
Re: [0.9.6] Scripting, findnoncollidingposition returns 1.7e
That does not surprise me, I thought it was an underflow being caused by an mistaken multiplication somewhere, but didn't find one (and non of the values could come anywhere close to large enough on their own) so I kind of assumed it was being set to a max size somewhere internally (obviously that of a double since it wasn't an integer) upon failure.kovarex wrote: This is an side effect, of us using the std::numeric_limits<double>::max() coordinates for emptyPosition internally ...
Thank youkovarex wrote:I will fix it, so it will return nil when the position wasn't found.
Re: [0.9.6] Scripting, findnoncollidingposition returns 1.7e
Fixed for 0.9.7

