27.12.2011, 18:44
Код:
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; } }
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(); }