Jump to content
RyuukoMatoi

selectMin returning -1 no matter the input or format

Recommended Posts

For context, my script is currently doing a comparison of distance on Init, using a few memory points i've added to my model LOD.

The problem starts when my script is comparing the two distances to find the smallest one, for some reason in engine, under object init, the selectMin command returns -1.

https://ibb.co/BCGmzwn
https://ibb.co/LtYD6rJ

These images represent my script in its current state of which i've swapped apply for a forEach loop, and selectMin for BIS_fnc_lowestNum and then BIS_fnc_findExtreme in 0 mode.

All 3 attempts have netted -1 as a result which will not help me in anyway meaningful.

Share this post


Link to post
Share on other sites

I think you forgot the "_" in systemChat str selMin;.

As a result, it might not output anything until _selectionName is output again. Find returns a -1.

Edit: But that can't be the problem.

  • Like 1

Share this post


Link to post
Share on other sites

Ah, so you are right, the systemChat wasn't properly configured, so i was reading the find instead of selectMin, which was probably working now i just need to work through the damages caused by the numerous iterations i've made the script for this one error
Thanks for spotting that, cant believe i'm caught out by a "_" again.

Edit: Solution for it not working come from the fact that i was attempting to find the distance in the Names Array instead of finding the Index i needed for the names array to then use for the memory points.

Edited by RyuukoMatoi
  • Like 2

Share this post


Link to post
Share on other sites

Ah now i see.
It's always funny how the code just does exactly what you programmed it to do😄.

  • Haha 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×