Hallo,
bei mir laden keine variablen, bzw. die werden nicht in den variablen gespeichert -.-
hier der Code...
ich weiß nicht weiter!
stock LadeAlleHaeuser()
{
new query[880];
mysql_query("SELECT * FROM `Haus_Data`");
mysql_store_result();
for(new i = 0; i < mysql_num_rows(); i++)
{
mysql_query("SELECT * FROM `Haus_Data`");
mysql_store_result();
while(mysql_fetch_row_format(query))
sscanf(query,"e<p<|>ds[24]ddddds[24]s[24]s[24]s[24]s[24]s[24]s[24]s[24]s[24]s[24]ddffffffs[150]ddd>",Haus[i]);
printf("%s,%d,%d,%d,%d,%s,%d,%d",Haus[i][H_Besitzer],Haus[i][H_Kaufpreis],Haus[i][H_Verkaufspreis],Haus[i][H_Miete],
Haus[i][H_Size],Haus[i][H_LabelText],Haus[i][H_Interior],Haus[i][H_VirtualWorld]);
}
printf("%d Haus/Häuser wurden geladen.",mysql_num_rows());
Contains_X_Houses = mysql_num_rows();
mysql_free_result();
return 1;
}
hatte das hier auch mal versucht aber auch fehlanzeige -.-
format(mysql_string,sizeof(mysql_string),"%d",i+1);
Haus[i][H_A_ID] = mysql_H_GetInt("Haus_Data","AutoI_ID","GivenID",mysql_string);
format(Haus[i][H_Besitzer],24,mysql_H_GetString("Haus_Data","Besitzer","GivenID",mysql_string));
Haus[i][H_Kaufpreis] = mysql_H_GetInt("Haus_Data","Kaufpreis","GivenID",mysql_string);
Haus[i][H_Verkaufspreis] = mysql_H_GetInt("Haus_Data","Verkaufspreis","GivenID",mysql_string);
Haus[i][H_Miete] = mysql_H_GetInt("Haus_Data","Miete","GivenID",mysql_string);
Haus[i][H_MieteAn] = mysql_H_GetInt("Haus_Data","MieteAn","GivenID",mysql_string);
Haus[i][H_Size] = mysql_H_GetInt("Haus_Data","Size","GivenID",mysql_string);
format(Haus[i][H_Mieter1],24,mysql_H_GetString("Haus_Data","Mieter1","GivenID",mysql_string));
format(Haus[i][H_Mieter2],24,mysql_H_GetString("Haus_Data","Mieter2","GivenID",mysql_string));
format(Haus[i][H_Mieter3],24,mysql_H_GetString("Haus_Data","Mieter3","GivenID",mysql_string));
format(Haus[i][H_Mieter4],24,mysql_H_GetString("Haus_Data","Mieter4","GivenID",mysql_string));
format(Haus[i][H_Mieter5],24,mysql_H_GetString("Haus_Data","Mieter5","GivenID",mysql_string));
format(Haus[i][H_Mieter6],24,mysql_H_GetString("Haus_Data","Mieter6","GivenID",mysql_string));
format(Haus[i][H_Mieter7],24,mysql_H_GetString("Haus_Data","Mieter7","GivenID",mysql_string));
format(Haus[i][H_Mieter8],24,mysql_H_GetString("Haus_Data","Mieter8","GivenID",mysql_string));
format(Haus[i][H_Mieter9],24,mysql_H_GetString("Haus_Data","Mieter9","GivenID",mysql_string));
format(Haus[i][H_Mieter10],24,mysql_H_GetString("Haus_Data","Mieter10","GivenID",mysql_string));
Haus[i][H_Locked] = mysql_H_GetInt("Haus_Data","Locked","GivenID",mysql_string);
Haus[i][H_Kuehlschrank] = mysql_H_GetInt("Haus_Data","Kuehlschrank","GivenID",mysql_string);
Haus[i][H_EingangX] = mysql_H_GetFloat("Haus_Data","EingangX","GivenID",mysql_string);
Haus[i][H_EingangY] = mysql_H_GetFloat("Haus_Data","EingangY","GivenID",mysql_string);
Haus[i][H_EingangZ] = mysql_H_GetFloat("Haus_Data","EingangZ","GivenID",mysql_string);
Haus[i][H_AusgangX] = mysql_H_GetFloat("Haus_Data","AusgangX","GivenID",mysql_string);
Haus[i][H_AusgangY] = mysql_H_GetFloat("Haus_Data","AusgangY","GivenID",mysql_string);
Haus[i][H_AusgangZ] = mysql_H_GetFloat("Haus_Data","AusgangZ","GivenID",mysql_string);
format(Haus[i][H_LabelText],150,mysql_H_GetString("Haus_Data","Label","GivenID",mysql_string));
Haus[i][H_Interior] = mysql_H_GetInt("Haus_Data","Interior","GivenID",mysql_string);
Haus[i][H_VirtualWorld] = mysql_H_GetInt("Haus_Data","VirtualWorld","GivenID",mysql_string);