SA-MP Forums Archive
[Error] error 017: undefined symbol "mysql_affected_rows" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Error] error 017: undefined symbol "mysql_affected_rows" (/showthread.php?tid=593317)



[Error] error 017: undefined symbol "mysql_affected_rows" - jose005 - 04.11.2015

1:
Quote:

forward OnWarnPlayer(iExtraID); public OnWarnPlayer(iExtraID) {
new szMessage[128],
szName[24],
szReason[64];

GetPVarString(iExtraID, "OnWarnPlayer", szName, 24);
GetPVarString(iExtraID, "OnWarnPlayerReason", szReason, 64);

if(mysql_affected_rows(g_iConnectionHandle[0])) { // THIS LINE!!
format(szMessage, sizeof szMessage, "Request processed; %s's has been warned.", szName);
SendClientMessage(iExtraID, COLOR_GRAD1, szMessage);

format(szMessage, sizeof szMessage, "AdmCmd: %s was offline warned by %s, reason: %s", szName, getPlayerName(iExtraID), szReason);
Log("logs/admin.log", szMessage);
}
else {
format(szMessage, sizeof szMessage, "There was an issue with warning %s's account.", szName);
SendClientMessage(iExtraID, COLOR_GRAD1, szMessage);
}

DeletePVar(iExtraID, "OnWarnPlayer");
DeletePVar(iExtraID, "OnWarnPlayerReason");

return 1;
}

2:
Quote:

forward OnSetSuspended(index, value);
public OnSetSuspended(index, value)
{
new string[128], name[24];
GetPVarString(index, "OnSetSuspended", name, 24);

if(mysql_affected_rows(g_iConnectionHandle[0])) //THIS LINE!!!
{
format(string, sizeof(string), "You have successfully %s %s's account.", ((value) ? ("suspended") : ("unsuspended")), name);
SendClientMessage(index, COLOR_WHITE, string);

format(string, sizeof(string), "AdmCmd: %s was offline %s by %s.", name, ((value) ? ("suspended") : ("unsuspended")), getPlayerName(index));
Log("logs/ban.log", string);
}
else
{
format(string, sizeof(string), "There was an issue with %s %s's account.", ((value) ? ("suspending") : ("unsuspending")), name);
SendClientMessage(index, COLOR_WHITE, string);
}
DeletePVar(index, "OnSetSuspended");

return 1;
}

Quote:

forward OnChangePlayerPass(extraid); public OnChangePlayerPass(extraid) {
if(IsPlayerConnected(extraid)) {
if(mysql_affected_rows(g_iConnectionHandle[0])) // THIS LINE!!!!!
SendClientMessage(extraid, COLOR_GRAD1, "You successfully changed the specified users password.");
else
SendClientMessage(extraid, COLOR_GRAD1, "There was an issue changing the specified users password.");
}
return 1;
}




Re: [Error] error 017: undefined symbol "mysql_affected_rows" - iKarim - 04.11.2015

Update your MySQL plugin include.