Usage: gms_location_countrycode ( )


Returns the 2-letter abbreviation of the player's country. This function can be called without being logged in.

Replies (4)

Last message on 15 Oct 2017

Arcadian on 30 Sep 2017, 15:59:37
This function does not return a 2-letter string, doesn't it??

I get a number, but It doesn't match with the ISO code of my location country.
Size43 (Administrator) on 30 Sep 2017, 16:06:36
It should return a string. What GM version and GameMaker Server version are you using?
Arcadian on 30 Sep 2017, 17:00:56
Version 1.4.1772 of GM, and the latest version of the server.

I´m using os_get_region() for the time being but I´m not sure if it´s the same thing...
Size43 (Administrator) on 15 Oct 2017, 22:11:09
Would that be the All or the Windows version?

This function returns the info based on IP, while os_get_region returns info provided by the user.