04.04.2013, 16:28
Hello, i have this code
And although print outputs a correct coordinate, the label just doesn't exist... whats wrong?
pawn Код:
new query[128];
format(query,sizeof(query),"SELECT * FROM `Garazai`");
mysql_query(query);
mysql_store_result();
Garazai = mysql_num_rows();
printf("%d",Garazai);
for(new i; i<Garazai; i++)
{
new string[128];
mysql_fetch_row_format(query,"|");
sscanf(query,"p<|>e<ds[64]dffffffddds[128]>",gInfo[i]);
printf("%f",gInfo[i][enX]);
if(gInfo[i][Owned]==0) {format(string,sizeof(string),"Garazas parduodamas\nKaina %s",gInfo[i][Kaina]);}
else if(gInfo[i][Owned]==1) {format(string,sizeof(string),"Savininkas %s",gInfo[i][Owner]);}
gInfo[i][ELabel]=Create3DTextLabel(string,0x00FF00FF,gInfo[i][enX],gInfo[i][enY],gInfo[i][enZ],50,-1);
}
mysql_free_result();
return 1;