06.03.2011, 12:14
Код:
#include <a_samp> #include <a_mysql> #include <zcmd> //MySQL defines. Tweak them where needed. #define SQL_HOST "localhost" #define SQL_USER "root" #define SQL_DB "programas" #define SQL_PASS "root" //new pName[MAX_PLAYER_NAME]; public OnFilterScriptInit() { mysql_debug(1); mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS); print("\n_____________________________"); print("| HidMin |"); print("| Crappy MySQL admin FS |"); print("| Loading |"); if( mysql_ping() == 1 ) print("|_MySQL:_Connected!______ __|"); else print("|_MySQL:_Failed_to_connect__|"); return 1; } public OnFilterScriptExit() { mysql_close(); return 1; } stock InicioConexao(playerid) { new Query[90],EscName[MAX_PLAYER_NAME]; mysql_real_escape_string(pName(playerid), EscName); format(Query, sizeof(Query), "SELECT * FROM `conta` WHERE `Nome` = '%s'", EscName); mysql_query(Query); mysql_store_result(); if(mysql_num_rows() != 0) { print("utilizador conectado"); } else { print("nao conectado a base de dados"); Kick(playerid); } mysql_free_result(); } public OnPlayerConnect(playerid) { InicioConexao(playerid); }
dб este erro
Код:
C:\Users\portatil\Desktop\New Folder\pawno\mysqlfinal.pwn(38) : error 017: undefined symbol "pName" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.