Code
for(new i = 0; i < sizeof Ammus; i++)
{
mysql_real_escape_string(Ammus[i][AmName], Ammus[i][AmName], dbhandle, 50);
format(Query, sizeof(Query), "SELECT * FROM `Ammus` WHERE `AmName` = '%s'", Ammus[i][AmName]);
mysql_query(dbhandle, Query);
mysql_store_result();
if(mysql_num_rows() == 0)
{
format(Query, sizeof(Query), "INSERT INTO `Ammus` (`AmName`) VALUES ('%s')", Ammus[i][AmName]);
mysql_query(dbhandle, Query);
}
else while(mysql_fetch_row(Query)) sscanf(Query, "p<|>{is[50]}ddd", Ammus[i][Erpresser], Ammus[i][Kasse], Ammus[i][Mats]);
mysql_free_result();
new dstr[200],bstr[30],tresentext[80];
CreateDynamicPickup(1239,1,Ammus[i][pick1x],Ammus[i][pick1y],Ammus[i][pick1z],-1);
CreateDynamicMapIcon(Ammus[i][pick1x],Ammus[i][pick1y],Ammus[i][pick1z], 6, 0, -1, -1, -1, 250.0);
if(Ammus[i][Erpresser] < 1) format(bstr,sizeof(bstr),"-");
else format(bstr,sizeof(bstr),"Clanname");//HIER HIN DANN DEN CLAN
format(dstr,sizeof(dstr),"%s\nErpresser: %s",Ammus[i][AmName],bstr);
Ammutext[i] = CreateDynamic3DTextLabel(dstr,0xBBBBBBFF,Ammus[i][pick1x],Ammus[i][pick1y],Ammus[i][pick1z]+0.75,20.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,0,0,-1,20.0);
format(tresentext,sizeof(tresentext),"%s\nDrücke 'F' um dir Waffen zu kaufen.",Ammus[i][AmName]);
AmmuTresenText[i] = CreateDynamic3DTextLabel(tresentext,0xBBBBBBFF,Ammus[i][pickupx],Ammus[i][pickupy],Ammus[i][pickupz],20.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,Ammus[i][virt],Ammus[i][inter],-1,20.0);
}
Alles anzeigen
[21:30:54] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('0')
[21:30:54] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('1')
[21:30:54] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('2')
[21:30:54] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('3')
[21:30:54] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('4')
Hab diese errors in meiner mysql_log.
hab schon nach dem problem im internet gesucht, aber nichts passendes in dieser art gefunden. Woran liegts?