29.03.2019, 09:15
What version of MySQL plugin are you using? Just use R41.
And I'm pretty sure your problem is with the function `GetFreeHouseID()`. Show us that code as well.
And why would you fetch the empty array using `GetFreeHouseID` in the first place? Just simply loop through the row count and then put in the array what row it's loading from, that is if you didn't get it:
And using `HouseInfo[id][HouseID] = id;` is simply useless because the "array slot" [id] is always going to be the same as "HouseID"...
Going deeper to discuss how you used the MySQL is even worse, just use a separate table for storing house weapons LMAO. Vince made a tutorial about it which is as much as relevant today than it was before.
And I'm pretty sure your problem is with the function `GetFreeHouseID()`. Show us that code as well.
And why would you fetch the empty array using `GetFreeHouseID` in the first place? Just simply loop through the row count and then put in the array what row it's loading from, that is if you didn't get it:
PHP Code:
for (new i; i < rows; i ++) {
HouseInfo[i][HouseSQLID] = cache_get_field_content_int(i, "ID", dbhandle);
// ... rest of the code.
}
Going deeper to discuss how you used the MySQL is even worse, just use a separate table for storing house weapons LMAO. Vince made a tutorial about it which is as much as relevant today than it was before.