Hey, ich möchte diesen Code umschreiben auf das Stricken Kid MySql plugin!
Allerdings bekomme ich Errors bei "mysql_retrive_row"
Das liegt daran das es die Funktion bei Stricken kid nicht giebt!
Wie kann ich den Code umschreiben ?
public LoadProperty()
{
new val[128],query[256];
for(new idx; idx<sizeof(HouseInfo); idx++)
{
format(query, sizeof(query), "SELECT * FROM `houses` WHERE `houseid` = %d", idx);
mysql_query(query);
mysql_store_result();
if(mysql_retrive_row())
{
mysql_fetch_field(val,"hcreated");
HouseInfo[idx][hCreated] = strval(val);
mysql_fetch_field(val,"hentrancex");
HouseInfo[idx][hEntrancex] = floatstr(val);
mysql_fetch_field(val,"hentrancey");
HouseInfo[idx][hEntrancey] = floatstr(val);
mysql_fetch_field(val,"hentrancez");
HouseInfo[idx][hEntrancez] = floatstr(val);
mysql_fetch_field(val,"hexitx");
HouseInfo[idx][hExitx] = floatstr(val);
mysql_fetch_field(val,"hexity");
HouseInfo[idx][hExity] = floatstr(val);
mysql_fetch_field(val,"hexitz");
HouseInfo[idx][hExitz] = floatstr(val);
mysql_fetch_field(val,"hhealthx");
HouseInfo[idx][hHealthx] = strval(val);
mysql_fetch_field(val,"hhealthy");
HouseInfo[idx][hHealthy] = strval(val);
mysql_fetch_field(val,"hhealthz");
HouseInfo[idx][hHealthz] = strval(val);
mysql_fetch_field(val,"harmourx");
HouseInfo[idx][hArmourx] = strval(val);
mysql_fetch_field(val,"harmoury");
HouseInfo[idx][hArmoury] = strval(val);
mysql_fetch_field(val,"harmourz");
HouseInfo[idx][hArmourz] = strval(val);
mysql_fetch_field(HouseInfo[idx][hOwner],"howner");
mysql_fetch_field(HouseInfo[idx][hDiscription],"hdiscription");
mysql_fetch_field(val,"hvalue");
HouseInfo[idx][hValue] = strval(val);
mysql_fetch_field(val,"hhel");
HouseInfo[idx][hHel] = strval(val);
mysql_fetch_field(val,"harm");
HouseInfo[idx][hArm] = strval(val);
mysql_fetch_field(val,"hint");
HouseInfo[idx][hInt] = strval(val);
mysql_fetch_field(val,"hlock");
HouseInfo[idx][hLock] = strval(val);
mysql_fetch_field(val,"howned");
HouseInfo[idx][hOwned] = strval(val);
mysql_fetch_field(val,"hrooms");
HouseInfo[idx][hRooms] = strval(val);
mysql_fetch_field(val,"hrent");
HouseInfo[idx][hRent] = strval(val);
mysql_fetch_field(val,"hrentabil");
HouseInfo[idx][hRentabil] = strval(val);
mysql_fetch_field(val,"hdate");
HouseInfo[idx][hDate] = strval(val);
mysql_fetch_field(val,"hlevel");
HouseInfo[idx][hLevel] = strval(val);
mysql_fetch_field(val,"hmuell");
HouseInfo[idx][hMuell] = strval(val);
}
mysql_free_result();
}
print("Häuser geladen!");
return 1;
}