A friend with AMXX 1.10 got same errors:
Code:
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\include\curl_consts.inc(497) : warning 200: symbol "CURLINFO_CONTENT_LENGTH_DOWNLOA" is truncated to 31 characters
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\include\curl_consts.inc(1033) : warning 200: symbol "CURLOPT_CONV_FROM_NETWORK_FUNCT" is truncated to 31 characters
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\include\curl_consts.inc(1037) : warning 200: symbol "CURLOPT_CONV_TO_NETWORK_FUNCTIO" is truncated to 31 characters
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\include\curl.inc(160) : warning 207: unknown #pragma
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\include\curl.inc(160) : error 038: extra characters on line
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\include\curl.inc(166) : warning 207: unknown #pragma
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\include\curl.inc(166) : error 038: extra characters on line
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\ore.sma(16) : error 017: undefined symbol "MAX_PLAYERS"
// C:\Users\teodo\OneDrive\Desktop\AMXX 1.8.2 COMPILER LOCAL 26.01\ore.sma(81 -- 82) : warning 213: tag mismatch
`
Meta List :
Code:
[ 1] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5461 ini Start ANY
[15] CURL AMXX RUN - curl_amxx_i386.so v1.1.1 pl1 ANY ANY
So why the hall doesn't work compile ?
Is because the COMPILER is 1.8.2 maybe ?`
--------------------
Edit: I've changed the compile to 1.9 and it compiles but the plugin doesn't work it shows 0 to everything.
I've made changes to be a client_command in chat to print the output, code:
PHP Code:
#include <amxmodx>
#include <curl>
#if !defined MAX_IP_WITH_PORT_LENGTH
#define MAX_IP_WITH_PORT_LENGTH 22
#endif
enum _:PlayerData
{
iScore,
iMinutes,
Float:flAvgScore,
iRank
}
new g_ePlayerData[MAX_PLAYERS + 1][PlayerData]
public plugin_init()
{
register_clcmd("say /playedtime", "SendRequest")
}
public SendRequest(id)
{
new CURL:curl = curl_easy_init();
new szTemp[100];
new szIP[MAX_IP_WITH_PORT_LENGTH]
get_user_ip(0, szIP, charsmax(szIP))
new iID[1]
iID[0] = id
new curl_slist:header
header = curl_slist_append(header, "text/html; charset=UTF-8");
header = curl_slist_append(header, "User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.126 Mobile Safari/537.36");
formatex(szTemp, charsmax(szTemp), "https://www.gametracker.com/player/%n/%s/", id, szIP);
if(curl)
{
curl_easy_setopt(curl, CURLOPT_URL, szTemp);
curl_easy_setopt(curl, CURLOPT_COOKIE, 1);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, "ReceiveData");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, id);
curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 1028);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
curl_easy_setopt(curl, CURLOPT_CAINFO, "cstrike/addons/amxmodx/cacert.pem");
curl_easy_perform(curl, "CurlCallback", iID, sizeof(iID) );
}
}
public ReceiveData(data[], size, nmemb, id)
{
// The position of the "Score: " div
new iPos = containi(data, "Score:")
if(iPos != -1)
{
g_ePlayerData[id][iScore] = str_to_num(data[iPos + 23])
}
iPos = containi(data, "Minutes Played:")
if(iPos != -1)
{
g_ePlayerData[id][iMinutes] = str_to_num(data[iPos + 32])
}
iPos = containi(data, "Score per Minute:")
if(iPos != -1)
{
g_ePlayerData[id][flAvgScore] = str_to_float(data[iPos + 34])
}
iPos = containi(data, "Rank on Server:")
if(iPos != -1)
{
g_ePlayerData[id][iRank] = str_to_num(data[iPos + 95])
}
return size * nmemb
}
public CurlCallback(CURL:cURLHandle , CURLcode:code, iID[])
{
if(code != CURLE_OK)
{
new szError[CURL_ERROR_SIZE]
curl_easy_strerror(code, szError,charsmax(szError))
log_amx("cURL error: %d ^"%s^"", code, szError);
}
new id = iID[0]
client_print(id, print_chat, "Score: %d | Minutes: %d | Score p. m.: %f | Rank: %d", g_ePlayerData[id][iScore], g_ePlayerData[id][iMinutes], \
g_ePlayerData[id][flAvgScore], g_ePlayerData[id][iRank])
curl_easy_cleanup(cURLHandle);
}
Image:
https://prnt.sc/nG0msaQF2VFr