./inc/stock.inc(221) : error 035: argument type mismatch (argument 3)
forward OnOSetNameProcess(playerid, newname[], oldname[]); public OnOSetNameProcess(playerid, newname[], oldname[]) { new rows, fields, str[128]; cache_get_data(rows, fields); if(!rows) return SCM(playerid, COLOR_ERROR, "That username does not exist."); format(str,sizeof(str), "You have set %s their name to %s.", oldname, newname); SCM(playerid, COLOR_COOLBLUE, str); SCM(playerid, COLOR_INFO, "Please inform the player of this change, or they might lose their account."); new targetid = cache_get_field_content_int(0, "acc_dbid", oldname); format(str, sizeof(str), "%s(%i)[%i] orenamed %s[%i] to %s", ReturnName(playerid), playerid, PlayerInfo[playerid][pDBID], oldname, targetid, newname); StatsLog(str); new query[128]; mysql_format(ourConnection, query, sizeof(query), "UPDATE `accounts` SET `acc_name` = '%e' WHERE `acc_name` = '%e' LIMIT 1", newname, oldname); mysql_tquery(ourConnection, query); return 1; }
new
resultId
;
cache_get_value_name_int(0, "acc_dbid", resultId);
Hey,
Grab the latest version of MySQL by BlueG; https://github.com/pBlueG/SA-MP-MySQL/releases Assuming your query only expects one row; PHP код:
|