Quote:
Originally Posted by arkshine
My english fails often. No need to react like that. -_-'
Still I don't understand because the continent code is composed of 2 characters so the output would be a string not integer.
If not, explain better.
|
Exactly, why waste precious processor power, memory & time with strings?
You still need an array of the continents to use the full name. No one would ever use a 2 char code. That's only for comparsion/logs, and the comparsion would be even easier with integers.
Code:
#define Europe 1
#define Africa 2
// et.c.
// ...
new Contintent[][] = {
"",
"Europe",
"Africa"
}
// ...
new ip[32];
get_user_ip(id, ip, 31);
server_print("Whatever: %s", Contintent[geoip_continent_code(ip);