RyuukoMatoi 2 Posted June 7, 2024 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/BCGmzwnhttps://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
Joshua9797 38 Posted June 7, 2024 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. 1 Share this post Link to post Share on other sites
RyuukoMatoi 2 Posted June 7, 2024 (edited) 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 June 7, 2024 by RyuukoMatoi 2 Share this post Link to post Share on other sites
Joshua9797 38 Posted June 7, 2024 Ah now i see. It's always funny how the code just does exactly what you programmed it to do😄. 1 Share this post Link to post Share on other sites