C:\Users\FakePath\clima.pwn(36) : error 017: undefined symbol "mysql_fetch_row_format" C:\Users\FakePath\clima.pwn(38) : error 017: undefined symbol "mysql_fetch_field_row" C:\Users\FakePath\clima.pwn(39) : error 017: undefined symbol "mysql_fetch_field_row" C:\Users\FakePath\clima.pwn(41) : error 017: undefined symbol "mysql_free_result" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
#include <a_samp>
#include <a_mysql>
#define MYSQL_SERVER "localhost"
#define MYSQL_USER "root"
#define MYSQL_PASSWORD ""
#define MYSQL_DB "samp"
new MySQL:BD;
forward ActualizarClima();
new NumeroClima[2];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Sistema de Clima Real por The Scope");
print("--------------------------------------\n");
BD = mysql_connect(#MYSQL_SERVER,#MYSQL_USER,#MYSQL_USER,#MYSQL_PASSWORD);
ActualizarClima();
return 1;
}
public OnFilterScriptExit()
{
mysql_close();
return 1;
}
public ActualizarClima()
{
new query[300], savingstring[20];
mysql_query(BD, "SELECT * FROM ClimaRealista");
cache_get_row_count(query[0]);
while(mysql_fetch_row_format(query,"|")) //LINHA 36
{
mysql_fetch_field_row(savingstring, "NumeroClima"); NumeroClima[0] = strval(savingstring); //LINHA 38
mysql_fetch_field_row(savingstring, "DiaNoche"); NumeroClima[1] = strval(savingstring); //LINHA 39
}
mysql_free_result(); //LINHA 41
switch (NumeroClima[1])
{
case 0: SetWorldTime(12); // Noche
case 1: SetWorldTime(0); // Dнa
}
switch (NumeroClima[0])
{
case 0, 1, 2, 3, 4, 17, 35, 37, 38, 47, 48: SetWeather(8); // Tormenta
case 5, 6, 7, 8, 9, 10, 11, 12, 18, 39, 40, 45: SetWeather(16); // Lluvia
case 13, 14, 15, 16, 41, 42, 43, 46: SetWeather(16); // Nieve
case 19, 21, 22, 23: SetWeather(2); // Nievla Soleado
case 26: SetWeather(36); // Nubleado
case 27, 28, 29, 30, 36: SetWeather(33); // Nubleado Soleado
case 31, 32, 33, 34: SetWeather(46); // Soleado
}
SetTimer("ActualizarClima", 300000, false);//5 Minutos
}
public ActualizarClima()
{
mysql_tquery(BD, "SELECT * FROM ClimaRealista", "ResultadoConsulta", "");
return 1;
}
forward ResultadoConsulta();
public ResultadoConsulta()
{
if(cache_num_rows() > 0)
{
cache_get_value_int(0, "NumeroClima", NumeroClima[0]);
cache_get_value_int(0, "DiaNoche", NumeroClima[1]);
}
switch (NumeroClima[1])
{
case 0: SetWorldTime(12); // Noche
case 1: SetWorldTime(0); // Dнa
}
switch (NumeroClima[0])
{
case 0, 1, 2, 3, 4, 17, 35, 37, 38, 47, 48: SetWeather(8); // Tormenta
case 5, 6, 7, 8, 9, 10, 11, 12, 18, 39, 40, 45: SetWeather(16); // Lluvia
case 13, 14, 15, 16, 41, 42, 43, 46: SetWeather(16); // Nieve
case 19, 21, 22, 23: SetWeather(2); // Nievla Soleado
case 26: SetWeather(36); // Nubleado
case 27, 28, 29, 30, 36: SetWeather(33); // Nubleado Soleado
case 31, 32, 33, 34: SetWeather(46); // Soleado
}
SetTimer("ActualizarClima", 300000, false);//5 Minutos
return 1;
}
PHP код:
|