08.05.2011, 12:36
Код:
morphinc.inc(43) : warning 217: loose indentation morphinc.inc(44) : warning 217: loose indentation a_sampmysql.inc(8) : error 010: invalid function or declaration (1791) : error 017: undefined symbol "samp_mysql_connect" (1801) error 017: undefined symbol "samp_mysql_connect"
Код:
public MySQLConnect(sqlhost[], sqluser[], sqlpass[], sqldb[]) // by Luk0r { print("MYSQL: Attempting to connect to server..."); samp_mysql_connect(sqlhost, sqluser, sqlpass); (this line) samp_mysql_select_db(sqldb); if(samp_mysql_ping()==0) { print("MYSQL: Database connection established."); return true; } else { print("MYSQL: Connection error, retrying..."); samp_mysql_connect(sqlhost, sqluser, sqlpass); (this line) samp_mysql_select_db(sqldb); if(samp_mysql_ping()==0) { print("MYSQL: Reconnection successful. We can continue as normal."); return true; } else { print("MYSQL: Could not reconnect to server, terminating server..."); SendRconCommand("exit"); return false; } } }