Hali!
Próbálkozok a ház rendszerrel,viszont valamiért nem tölti be az adatokat,MySQL R39.2 -õt használok,MySQL -re sikeresen csatlakozik.
MySQL Logban ennyit ír:
[11:51:01] [WARNING] cache_get_data - no active cache
Itt pedig a betöltés,a LoadHouses() meghívódik OnGameModeInit -nél.
public LoadHouses()
{
new num_fields,num_rows;
for(new i=1; i<=MAX_HOUSES; i++)
{
format(gQuery,256, \"SELECT * FROM shouses WHERE ID = \'%i\'\", i);
mysql_function_query(dbhandle,gQuery,false,\"\",\"\");
cache_get_data(num_rows,num_fields,dbhandle);
if(num_rows == 0) break;
else if(num_rows != 0)
{
new lString[256];
switch(hInfo[Owned])
{
case 0:
{
format(lString, sizeof(lString), \"House Owned: No\\nHouse Owner: None\\nHouse Price: $%i\", hInfo[Price]);
hInfo[Label] = CreateDynamic3DTextLabel(lString, COLOR_BLUE, hInfo[OX], hInfo[OY], hInfo[OZ]+0.5, 20.0);
hInfo[icon] = CreateDynamicMapIcon(hInfo[OX], hInfo[OY], hInfo[OZ], 31, -1);
hInfo[EnterPickup] = CreateDynamicPickup(1273, 23, hInfo[OX], hInfo[OY], hInfo[OZ], -1, -1, -1, 20.0);
hInfo[ExitPickup] = CreateDynamicPickup(1273, 23, hInfo[iX], hInfo[iY], hInfo[iZ], -1, -1, -1, 20.0);
}
case 1:
{
format(lString, sizeof(lString),\"House Owned: Yes\\nHouse Owner: %s\\nHouse Price: $%i\\nHouse Locked: %s\", hInfo[Owner], hInfo[Price], (hInfo[Locked] == 1) ? (\"Yes\") : (\"No\"));
hInfo[Label] = CreateDynamic3DTextLabel(lString, COLOR_RED, hInfo[OX], hInfo[OY], hInfo[OZ]+0.5, 20.0);
hInfo[icon] = CreateDynamicMapIcon(hInfo[OX], hInfo[OY], hInfo[OZ], 32, -1);
hInfo[EnterPickup] = CreateDynamicPickup(1273, 23, hInfo[OX],hInfo[OY], hInfo[OZ], -1, -1, -1, 20.0);
hInfo[ExitPickup] = CreateDynamicPickup(1273, 23, hInfo[iX], hInfo[iY], hInfo[iZ], -1, -1, -1, 20.0);
}
}
CreatedHouses++;
}
}
printf(\"[House System] %i hazak betoltve.\", CreatedHouses);
return 1;
}
Mi lehet a hiba ? Elõre is köszi!