Ich habe ein MySQL Plugin und wollte damit, paar Informationen laden.
Jedoch scheitert das ganze beim 2ten Haus.
Code:
public LoadDatabaseHouses()
{
	new line[256], string[24], id;
	samp_mysql_select_db("server");
	samp_mysql_query("SELECT * FROM `haus`");
	samp_mysql_store_result();
	while(samp_mysql_fetch_row(line))
	{
		samp_mysql_get_field("hausid", string);
		id = strval(string);
		samp_mysql_get_field("accid", string);
		HouseStream[id][ownerID] = strval(string);
		samp_mysql_get_field("preis", string);
		HouseStream[id][hprice] = strval(string);
		samp_mysql_get_field("verkauf", string);
		HouseStream[id][hsell] = strval(string);
		samp_mysql_get_field("name", string);
		format(HouseStream[id][hname], 24, "%s", string);
		samp_mysql_get_field("interior", string);
		HouseStream[id][hint] = strval(string);
		samp_mysql_get_field("welt", string);
		HouseStream[id][hworld] = strval(string);
		samp_mysql_get_field("enterX", string);
		HouseStream[id][entrX] = floatstr(string);
		samp_mysql_get_field("enterY", string);
		HouseStream[id][entrY] = floatstr(string);
		samp_mysql_get_field("enterZ", string);
		HouseStream[id][entrZ] = floatstr(string);
		if(HouseStream[id][ownerID] == 0)
		{
			CreatePickup(1273, 1, HouseStream[id][entrX], HouseStream[id][entrY], HouseStream[id][entrZ], -1);
		}
		else
		{
			CreatePickup(1272, 1, HouseStream[id][entrX], HouseStream[id][entrY], HouseStream[id][entrZ], -1);
		}
		printf("Haus %d is now avaible.", id);
		if(id == MAX_HOUSES) return 1;
	}
	return 1;
}
Resultat:
Am Ende steht nur: "Haus 1 is now aviable.".
Das Serverfenster schließt sich gleich nachm Öffnen.
Wichtig:
Ich will, dass auch das Haus 2 geladen wird.
 
		 
		
		
	