Help with this problem please - 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: Help with this problem please (
/showthread.php?tid=306721)
Help with this problem please -
Aguylera - 27.12.2011
Код:
stock pName(playerid)
{
if(PlayerInfo[playerid][pAdminDuty] != 0 && PlayerInfo[playerid][pAdmin] != 0)
{
return mysql_GetStr(playerid, "Tag");
}
else
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
Replace(name, "_", " ");
return name;
}
}
Errors:
error 079: inconsistent return types (array & non-array)
MYSQL function:
Код:
mysql_GetStr(i, col[])
{
new name[MAX_PLAYER_NAME];
format(string, sizeof(string),"SELECT %s FROM players WHERE Nombre='%s'",col, GetPlayerName(i, name, sizeof(name)));
mysql_query(string);
return mysql_free_result();
}
Re: Help with this problem please -
CoaPsyFactor - 27.12.2011
you cam not return mysql_free_result, you need to fetch then to free result
Re: Help with this problem please -
Aguylera - 27.12.2011
Quote:
Originally Posted by CoaPsyFactor
you cam not return mysql_free_result, you need to fetch then to free result
|
Can you tell me how can i do that?