Hi,
wie im Threadtitel beschrieben habe ich seit der Umstellung von MySQL R5 auf R39-3 einige Probleme mit meinem Haus-& Bizsystem.
Die Daten werden zwar in die Tabelle geschrieben, doch nicht geladen.
Dazu hier mein Code:
case QuerySelectAllBiz:
{
cache_get_data(rows,fields);
if(rows > MAX_BIZ) return 0;
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
//schreibt in Tabelle
format(q,sizeof q,"SELECT * FROM `biz` WHERE `ID` = '%d'",rows);
mysql_pquery(dbHandle, q, "OnQueryFinish", "sdd", q, QueryCallLoadBiz, playerid);
}
case QuerySelectAllHouse:
{
cache_get_data(rows,fields);
if(rows > MAX_HAEUSER) return 0;
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
//schreibtr in Tabelle
format(str,sizeof str,"SELECT * FROM `haeuser` WHERE `ID` = '%d'",rows);
mysql_pquery(dbHandle, str, "OnQueryFinish", "sdd", str, QueryCallLoadHouse, playerid);
}
Hier der Code wo das ganze geladen wird:
case QueryCallLoadHouse:
{
cache_get_data(rows,fields);
if(rows > 0) {
new ho;
for(;ho<rows;ho++) {
//if(ho==0){ho++;}
cache_get_field_content(ho,"ID",result);
HausInfo[ho][hID] = strval(result);
cache_get_field_content(ho,"PosX",result);
HausInfo[ho][hPosX] = floatstr(result);
cache_get_field_content(ho,"PosY",result);
HausInfo[ho][hPosY] = floatstr(result);
cache_get_field_content(ho,"PosZ",result);
HausInfo[ho][hPosZ] = floatstr(result);
cache_get_field_content(ho,"Level",result);
HausInfo[ho][hLevel] = strval(result);
cache_get_field_content(ho,"Preis",result);
HausInfo[ho][hPreis] = strval(result);
cache_get_field_content(ho,"Besitzer",result);
format(HausInfo[ho][hBesitzer],24,"%s",result);
cache_get_field_content(ho,"Bought",result);
HausInfo[ho][hBought] = strval(result);
cache_get_field_content(ho,"Rooms",result);
HausInfo[ho][hRooms] = strval(result);
cache_get_field_content(ho,"InteriorID",result);
HausInfo[ho][hInteriorID] = strval(result);
cache_get_field_content(ho,"Interior",result);
HausInfo[ho][hInterior] = strval(result);
cache_get_field_content(ho,"IntX",result);
HausInfo[ho][hIntX] = floatstr(result);
cache_get_field_content(ho,"IntY",result);
HausInfo[ho][hIntY] = floatstr(result);
cache_get_field_content(ho,"IntZ",result);
HausInfo[ho][hIntZ] = floatstr(result);
cache_get_field_content(ho,"Locked",result);
HausInfo[ho][hLocked] = strval(result);
cache_get_field_content(ho,"Rentable",result);
HausInfo[ho][hRentable] = strval(result);
cache_get_field_content(ho,"RentPrice",result);
HausInfo[ho][hRentPrice] = strval(result);
cache_get_field_content(ho,"Renter1",result);
format(HausInfo[ho][hRenter1],24,"%s",result);
cache_get_field_content(ho,"Renter2",result);
format(HausInfo[ho][hRenter2],24,"%s",result);
cache_get_field_content(ho,"Renter3",result);
format(HausInfo[ho][hRenter3],24,"%s",result);
cache_get_field_content(ho,"Renter4",result);
format(HausInfo[ho][hRenter4],24,"%s",result);
cache_get_field_content(ho,"Renter5",result);
format(HausInfo[ho][hRenter5],24,"%s",result);
cache_get_field_content(ho,"Renter6",result);
format(HausInfo[ho][hRenter6],24,"%s",result);
HausInfo[ho][hVW] = HausInfo[ho][hID]+1;
HausInfo[ho][hOutPickup] = CreatePickup(1318,1,HausInfo[ho][hIntX],HausInfo[ho][hIntY],HausInfo[ho][hIntZ],HausInfo[ho][hVW]);
//Label und son mist erstellen
HausInfo[ho][hCreated]=true;
}
}
}
case QueryCallLoadBiz:
{
cache_get_data(rows,fields);
if(rows > 0) {
new bi;
for(;bi<rows;bi++) {
//if(bi==0){bi++;}
cache_get_field_content(bi,"ID",result);
BizInfo[bi][bID] = strval(result);
cache_get_field_content(bi,"PosX",result);
BizInfo[bi][bPosX] = floatstr(result);
cache_get_field_content(bi,"PosY",result);
BizInfo[bi][bPosY] = floatstr(result);
cache_get_field_content(bi,"PosZ",result);
BizInfo[bi][bPosZ] = floatstr(result);
cache_get_field_content(bi,"Level",result);
BizInfo[bi][bLevel] = strval(result);
cache_get_field_content(bi,"Preis",result);
BizInfo[bi][bPreis] = strval(result);
cache_get_field_content(bi,"Besitzer",result);
format(BizInfo[bi][bID],24,"%s",result);
cache_get_field_content(bi,"Bought",result);
BizInfo[bi][bBought] = strval(result);
cache_get_field_content(bi,"Typ",result);
format(BizInfo[bi][bTyp],32,"%s",result);
cache_get_field_content(bi,"Produkte",result);
BizInfo[bi][bProds] = strval(result);
cache_get_field_content(bi,"ProdukteBestellt",result);
BizInfo[bi][bProdsBestellt] = strval(result);
cache_get_field_content(bi,"InteriorID",result);
BizInfo[bi][bInteriorID] = strval(result);
cache_get_field_content(bi,"Interior",result);
BizInfo[bi][bInterior] = strval(result);
cache_get_field_content(bi,"IntX",result);
BizInfo[bi][bIntX] = floatstr(result);
cache_get_field_content(bi,"IntY",result);
BizInfo[bi][bIntY] = floatstr(result);
cache_get_field_content(bi,"IntZ",result);
BizInfo[bi][bIntZ] = floatstr(result);
cache_get_field_content(bi,"Locked",result);
BizInfo[bi][bLocked] = strval(result);
cache_get_field_content(bi,"Kasse",result);
BizInfo[bi][bKasse] = strval(result);
cache_get_field_content(bi,"Name",result);
format(BizInfo[bi][bName],64,"%s",result);
cache_get_field_content(bi,"Price",result);
BizInfo[bi][bPrice] = strval(result);
cache_get_field_content(bi,"MaxProdukte",result);
BizInfo[bi][bMaxProds] = strval(result);
BizInfo[bi][bVW] = bi+1;
BizInfo[bi][bOutPickup] = CreatePickup(1318,1,BizInfo[bi][bIntX],BizInfo[bi][bIntY],BizInfo[bi][bIntZ],BizInfo[bi][bVW]);
//Label und son mist erstellen
BizInfo[bi][bLabel]=Create3DTextLabel(str,COLOR_AO,BizInfo[bi][bPosX],BizInfo[bi][bPosY],BizInfo[bi][bPosZ],13,0,1);
BizInfo[bi][bOutLabel]=Create3DTextLabel("Verlassen:\n~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_RED,BizInfo[bi][bIntX],BizInfo[bi][bIntY],BizInfo[bi][bIntZ],7,BizInfo[bi][bVW],1);
BizInfo[bi][bCreated]=true;
}
}
}
Warum klappt das nicht?
lg
Deagle
Jeffry: