31.05.2009, 23:08
Hi, i have some Problems with Loading some Stuff from Mysql. The Code looks like this:
The Output in my Log looks like
So whats wrong? Why doesnt it work properly?
Код:
for (new b = 1; b <= gBuilding; b++) { format(sql, sizeof(sql), "SELECT * FROM building WHERE id='%d'", b); samp_mysql_query(sql); samp_mysql_store_result(); if (samp_mysql_num_rows() > 0) { samp_mysql_fetch_row(Data); printf("%s",Data); if(sscanf(Data,"p|dffffffdsd", b, BuildingInfo[b][buEntrancex], BuildingInfo[b][buEntrancey], BuildingInfo[b][buEntrancez], BuildingInfo[b][buExitx], BuildingInfo[b][buExity], BuildingInfo[b][buExitz], BuildingInfo[b][buInterior], BuildingInfo[b][buMessage], BuildingInfo[b][buCost])) printf("Fail"); printf("%d %f %f %f",b,BuildingInfo[b][buEntrancex],BuildingInfo[b][buEntrancey],BuildingInfo[b][buEntrancez]); } }
Код:
1|-1422.358765|-288.384186|14.148400|0.000000|0.000000|0.000000|0|Aiport|0 1 0.000000 0.000000 0.000000 2|-2026.781128|-100.340599|35.164101|2026.790527|-104.883400|1035.171875|3|Driving School|5000 2 0.000000 0.000000 0.000000