Hi,
ich nutze das Strickenkind-Plugin und hab mich mal probiert, denke aber die Lösung ist falsch, geht ja auch nicht... gerne kann man den Code umformen...
public OnGameModeInit()
{
printf("1!");
mysql_init(LOG_ALL);
mysql_connect("localhost", "xxx", "xxx", "xxx");
printf("2!");
new field[20][32],
id;
new data[500] = mysql_query("SELECT * FROM `bizzes`;");//ERROR 1
mysql_store_result();
printf("3!");
while(mysql_fetch_row(datax))
{
id = strval(field[0]);
format(Biz[id][bizOwner], MAX_PLAYER_NAME, field[1]);
format(Biz[id][bizName], MAX_BIZ_NAME, field[2]);
Biz[id][bizCash] = strval(field[3]);
Biz[id][bizX] = floatstr(field[4]);
Biz[id][bizY] = floatstr(field[5]);
Biz[id][bizZ] = floatstr(field[6]);
Biz[id][bizVW] = strval(field[7]);
}
mysql_free_result();
UpdateBizzes();
printf("4!");
new datay[500] = mysql_query("SELECT * FROM `houses`;");//ERROR2
mysql_store_result();
printf("5!");
while(mysql_fetch_row(datay))
{
id = strval(field[0]) - 1;
House[id][houseActive] = 1;
format(House[id][houseOwner], MAX_PLAYER_NAME, field[1]);
House[id][houseCash] = strval(field[2]);
House[id][houseRent] = strval(field[3]);
House[id][houseX] = floatstr(field[4]);
House[id][houseY] = floatstr(field[5]);
House[id][houseZ] = floatstr(field[6]);
House[id][houseVW] = strval(field[7]);
House[id][houseInt] = strval(field[8]);
House[id][houseToX] = floatstr(field[9]);
House[id][houseToY] = floatstr(field[10]);
House[id][houseToZ] = floatstr(field[11]);
House[id][houseToVW] = strval(field[12]);
House[id][houseToInt] = strval(field[13]);
}
mysql_free_result();
UpdateHouses();
printf("6!");
Und bei den "//ERROR"-Kommentaren kommt folgender Error:
Sieht jemand den Fehler?
Er soll eigtl. die Daten aus der MySQL-Datenbank nur in die Enums setzen & Pickup sowie 3D-Label erstellen ...