PDA

View Full Version : Gangzones problem


nastasescu
05/04/2014, 07:01 AM
So, i have this function on PAWN based on Mysql

function LoadTurfs()
{
new string[256],idx,casee=0;
format(string, sizeof(string), "SELECT * FROM `turfs`");
mysql_query(handle, string);
mysql_store_result();
while(mysql_retrieve_row())
{
idx++;
mysql_fetch_field_row(string, "ID"); TurfInfo[idx][zID] = strval(string);
mysql_fetch_field_row(string, "Owned"); TurfInfo[idx][zOwned] = strval(string);
mysql_fetch_field_row(string, "MinX"); TurfInfo[idx][zMinX] = floatstr(string);
mysql_fetch_field_row(string, "MinY"); TurfInfo[idx][zMinY] = floatstr(string);
mysql_fetch_field_row(string, "MaxX"); TurfInfo[idx][zMaxX] = floatstr(string);
mysql_fetch_field_row(string, "MaxY"); TurfInfo[idx][zMaxY] = floatstr(string);
printf("Turf: %d Owned: %d MinX: %f MinY: %f MaxX: %f MaxY: %f",idx,TurfInfo[idx][zOwned],TurfInfo[idx][zMinX],TurfInfo[idx][zMinY],TurfInfo[idx][zMaxX],TurfInfo[idx][zMaxY]);
casee++;
}
mysql_free_result();
printf("-Turfs: %d", casee);
return 1;
}
My server log says:

-Turfs: 0
Turfs[1] = GangZoneCreateM(0.000000,0.000000,0.000000,0.00000 0);
Turfs[2] = GangZoneCreateM(0.000000,0.000000,0.000000,0.00000 0);
Turfs[3] = GangZoneCreateM(0.000000,0.000000,0.000000,0.00000 0);
Turfs[4] = GangZoneCreateM(0.000000,0.000000,0.000000,0.00000 0);
Turfs[5] = GangZoneCreateM(0.000000,0.000000,0.000000,0.00000 0);
etc.
What can i do? In my database all works fine...

I really don't understand why don't work :(
I'm using mysql r33