Acording to the slic documentation it takes two arguments. I was able to verify this. Also according to the slic documentation both arguments are location variables. Unfortunatly if I give it two locations I get a bounce message windows box in SlicDebug mode: Wrong Type of Argument.
OK while I was writing I had to test something and I figured out something more, so my question is at least anwered partly:
If I use something like this I get the windows bounce messege:
location_t MGLoc;
GetNearestWater(army[0].location, MGLoc);
But if I use this, I don't get a bounce message:
location_t MGLoc;
GetNearestWater(army[0].location, MGLoc.location);
The only problem is the function know returns the distance to that tile but it doesn't fill the location variable.
-Martin
OK while I was writing I had to test something and I figured out something more, so my question is at least anwered partly:
If I use something like this I get the windows bounce messege:
location_t MGLoc;
GetNearestWater(army[0].location, MGLoc);
But if I use this, I don't get a bounce message:
location_t MGLoc;
GetNearestWater(army[0].location, MGLoc.location);
The only problem is the function know returns the distance to that tile but it doesn't fill the location variable.

-Martin
. So you can write a function to obtain a nearest water tile by repeating the above process until you reach water. Of course, this is likely to be relatively slow, but perhaps not too bad. You could of course save the information in an array for any tile you need to calculate so that you never repeat the calculation for that tile, but it probably wouldn't be worthwhile to.
Comment