AHHHHHHH THIS TOOK ME SO LONG TO FIGURE OUT EVEN THOUGH IT'S PROBABLY NOT A VERY BIG DEAL!!!! basically, I'm working on a game, and I wanted to a way to find the closest number to a variable in a list, so I did. The 'my variable' is what it looks for. it works by just subtracting everything by the variable so that it finds the distance between your number and each number on the list. Then it takes the lowest number and it puts that on lowest, and then the number of it on closest. does kinda tweak if there are two numbers that are the same (it just goes to the higher one) so if you use this, make sure to have it use large numbers. :)