Help with this problem please
#1

Код:
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();
}
Reply
#2

you cam not return mysql_free_result, you need to fetch then to free result
Reply
#3

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)