SA-MP Forums Archive
Mysql cannot load functions. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql cannot load functions. (/showthread.php?tid=390479)



Mysql cannot load functions. - razol - 06.11.2012

Hello guys, i got a problem with mysql load.Firstly i made a new house system for my server.But something wrong.
Problem is:

When i'm loading the functions from mysql table.Labels,pickups and house positions cannot load.I looked toward to mysql logs.But everything are fine.Now i'm writing the pawn codes.Please help me about this issue.Thank you for help already.

pawn Код:
function EvleriYukle()
{
mysql_query("SELECT NULL FROM `evler`");    mysql_store_result();   toplamevler = mysql_num_rows();
new toplamyuklenenevsayisi = 1;
new formatlama1[600],formatlama2[600];
for(new i = 1; i <= toplamevler; i++)
{
HD[i][ID] = EvInt(i,"ID");
HD[i][owner] = EvStr(i,"owner");
HD[i][price] = EvInt(i,"price");
HD[i][exteriorX] = EvFlo(i,"exteriorX");
HD[i][exteriorY] = EvFlo(i,"exteriorY");
HD[i][exteriorZ] = EvFlo(i,"exteriorZ");
HD[i][interiorX] = EvFlo(i,"interiorX");
HD[i][interiorY] = EvFlo(i,"interiorY");
HD[i][interiorZ] = EvFlo(i,"interiorZ");
HD[i][interiorInt] = EvInt(i,"interiorInt");
HD[i][locked] = EvInt(i,"locked");
format(formatlama1,sizeof(formatlama1),"{0080FF}Ev Sahibi: {FFFFFF}%s\n{0080FF}Ev Durumu: {FFFFFF}Satilik Degil\n{0080FF}Ev Fiyati: {FFFFFF}$%i",HD[i][owner],HD[i][price]);
format(formatlama2,sizeof(formatlama2),"{0080FF}Ev Sahibi: {FFFFFF}YOK\n{0080FF}Ev Durumu: {FFFFFF}Satilik\n{0080FF}Ev Fiyati: {FFFFFF}$%i",HD[i][price]);
if(strlen(HD[i][owner]) > 0){ Create3DTextLabel(formatlama1, -1, HD[i][exteriorX], HD[i][exteriorY], HD[i][exteriorZ], 40.0, 0, 1); CreatePickup(1273, 1, HD[i][exteriorX], HD[i][exteriorY], HD[i][exteriorZ], -1);}
else {Create3DTextLabel(formatlama2, -1, HD[i][exteriorX], HD[i][exteriorY], HD[i][exteriorZ], 40.0, 0, 1); CreatePickup(1273, 1, HD[i][exteriorX], HD[i][exteriorY], HD[i][exteriorZ], -1);}
toplamyuklenenevsayisi++;
}
return 1;
}



Re: Mysql cannot load functions. - razol - 06.11.2012

Any help please?


Re: Mysql cannot load functions. - adsy - 06.11.2012

only guess i have is this:

Код:
mysql_query("SELECT NULL FROM `evler`");
is it supposed to be something like this?

Код:
mysql_query("SELECT * FROM `evler`");



Re: Mysql cannot load functions. - razol - 06.11.2012

Quote:
Originally Posted by adsy
Посмотреть сообщение
only guess i have is this:

Код:
mysql_query("SELECT NULL FROM `evler`");
is it supposed to be something like this?

Код:
mysql_query("SELECT * FROM `evler`");
It doesn't matter 1. code or 2. code i tried both of them.Problem is still alive.Thanks anyway.

Any help ?


Re: Mysql cannot load functions. - razol - 06.11.2012

Any help please ?