17.10.2016, 14:53
I'll link to samp wiki for R40 which explains all the functions and their parameters in case you need it: https://sampwiki.blast.hk/wiki/MySQL/R40
connection handle is no longer a parameter in cache_get_value_name, remove it.
cache_insert_id does not have any parameter, remove connection handle.
connection handle has now a tag:
cache_get_value_int has two usages:
Those do not return the value directly but pass it by reference, so you will need to change it to:
As it is non-threaded queries, you will need to store the cache-id and remove it from the memory to avoid memory leaks. Threaded queries are always recommended though so consider changing it eventually.
Quote:
GW.pwn(10040) : warning 213: tag mismatch
Код:
cache_get_value_name(0, "exists", field, ConnectMYSQL); |
Quote:
GW.pwn(10060) : warning 202: number of arguments does not match definition
Код:
new facid = cache_insert_id(ConnectMYSQL); |
Quote:
GW.pwn(11429) : error 025: function heading differs from prototype
Код:
public OnQueryError(errorid, error[], callback[], query[], connectionHandle) { |
pawn Код:
public OnQueryError(errorid, const error[], const callback[], const query[], MySQL:handle)
Quote:
THANK YOU!
You know how to fix it? PHP код:
PHP код:
PHP код:
|
pawn Код:
native cache_get_value_index_int(row_idx, column_idx, &destination);
native cache_get_value_name_int(row_idx, const column_name[], &destination);
pawn Код:
new player_fishing_skills, Cache: result = mysql_query(ConnectMYSQL, "SELECT * FROM `accounts` ORDER BY FISHINGskills DESC LIMIT 15");
for (new r, rows = cache_num_rows(); r < rows; r++)
{
cache_get_value(r, "Username", name);
cache_get_value_int(r, "FISHINGskills", player_fishing_skills);
format(sG, sizeof(sG), "{FFFFFF}%i- %s - %d\n", r + 1, name, player_fishing_skills);
strcat(DialogNGL, sG);
}
ShowPlayerDialog(playerid, 20000, DIALOG_STYLE_MSGBOX, "Raking Fishing", DialogNGL, "Fechar", "");
cache_delete(result);