Hey, ich schreibe derzeit mein Script auf MySql um
Habe aber ein Problem das "LoadProperty" nicht funktioniert
Weiß jemand was ich falsch gemacht hab ?
public LoadProperty()
{
new val[128],query[256],rows,fields;
for(new idx=0; idx<sizeof(HouseInfo); idx++)
{
format(query, sizeof(query), "SELECT * FROM `houses` WHERE `houseid`='%i'", idx);
mysql_function_query(mysqlcon,query, false, "", "");
cache_get_data(rows,fields);
if(rows)
{
cache_get_field_content(0,"hcreated",val);
HouseInfo[idx][hCreated] = strval(val);
cache_get_field_content(0,"hentrancex",val);
HouseInfo[idx][hEntrancex] = floatstr(val);
cache_get_field_content(0,"hentrancey",val);
HouseInfo[idx][hEntrancey] = floatstr(val);
cache_get_field_content(0,"hentrancez",val);
HouseInfo[idx][hEntrancez] = floatstr(val);
cache_get_field_content(0,"hexitx",val);
HouseInfo[idx][hExitx] = floatstr(val);
cache_get_field_content(0,"hexity",val);
HouseInfo[idx][hExity] = floatstr(val);
cache_get_field_content(0,"hexitz",val);
HouseInfo[idx][hExitz] = floatstr(val);
cache_get_field_content(0,"hhealthx",val);
HouseInfo[idx][hHealthx] = strval(val);
cache_get_field_content(0,"hhealthy",val);
HouseInfo[idx][hHealthy] = strval(val);
cache_get_field_content(0,"hhealthz",val);
HouseInfo[idx][hHealthz] = strval(val);
cache_get_field_content(0,"harmourx",val);
HouseInfo[idx][hArmourx] = strval(val);
cache_get_field_content(0,"harmoury",val);
HouseInfo[idx][hArmoury] = strval(val);
cache_get_field_content(0,"harmourz",val);
HouseInfo[idx][hArmourz] = strval(val);
cache_get_field_content(0,"howner",HouseInfo[idx][hOwner]);
cache_get_field_content(0,"hdiscription",HouseInfo[idx][hDiscription]);
cache_get_field_content(0,"hvalue",val);
HouseInfo[idx][hValue] = strval(val);
cache_get_field_content(0,"hhel",val);
HouseInfo[idx][hHel] = strval(val);
cache_get_field_content(0,"harm",val);
HouseInfo[idx][hArm] = strval(val);
cache_get_field_content(0,"hint",val);
HouseInfo[idx][hInt] = strval(val);
cache_get_field_content(0,"hlock",val);
HouseInfo[idx][hLock] = strval(val);
cache_get_field_content(0,"howned",val);
HouseInfo[idx][hOwned] = strval(val);
cache_get_field_content(0,"hrooms",val);
HouseInfo[idx][hRooms] = strval(val);
cache_get_field_content(0,"hrent",val);
HouseInfo[idx][hRent] = strval(val);
cache_get_field_content(0,"hrentabil",val);
HouseInfo[idx][hRentabil] = strval(val);
cache_get_field_content(0,"hdate",val);
HouseInfo[idx][hDate] = strval(val);
cache_get_field_content(0,"hlevel",val);
HouseInfo[idx][hLevel] = strval(val);
cache_get_field_content(0,"hmuell",val);
HouseInfo[idx][hMuell] = strval(val);
}
// mysql_free_result();
}
print("Häuser geladen!");
return 1;
}