Jump to content
Sign in to follow this  
gc8

nearestLocation with no name

Recommended Posts

hi i was trying to get name of location but the name command returns empty string...

i tried this:


t = nearestLocation [getpos player, "NameCityCapital"];

name t; // Empty string

t has location set though.

is it buggy?

Share this post


Link to post
Share on other sites

have you tried "NameCity" or "NameVillage" only, maybe there is no capital set, tried a different map, is it an official one?

(check bin\Config.bin\CfgLocationTypes for valid location types)

Share this post


Link to post
Share on other sites

Try this.... the hint will show you what's on the island/map.

_locs = [ nearestLocations [[0, 0, 0], ["NameCityCapital", "NameCity", "NameVillage", "NameLocal"], 100000]];
hint format ["%1",_locs];

On Utes for instance...there are no Capitals or Cities.

Share this post


Link to post
Share on other sites

Try this:

t = nearestLocation [getpos player, "NameCityCapital"];

_name = text t;

Share this post


Link to post
Share on other sites
Try this:

t = nearestLocation [getpos player, "NameCityCapital"];

_name = text t;

That was correct thanks

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
Sign in to follow this  

×