Hi,
ich habe gerade mal ein Script von mir von der MySQL R5 auf die R39 umgeschrieben.
Seit der Umstellung, laden jedoch nur 2 von 13 Fraktionen.
Hier mein Code:
C
//OnGameModeInit
mysql_pquery(dbHandle,"SELECT * FROM `Frak`","OnQueryFinish","sd","SELECT * FROM `Frak`",QueryCallFrak);
//OnQueryFinish
case QueryCallFrak:
{
cache_get_data(rows,fields);
printf("DEBUG FRAK: cache_get_data(%d,%d)",rows,fields);
new fr;
for(;fr<rows;fr++) {
//if(fr==0){fr++;}
cache_get_field_content(fr,"ID",result);
FrakInfo[fr][fID] = strval(result);
cache_get_field_content(fr,"Kasse",result);
FrakInfo[fr][fKasse] = strval(result);
cache_get_field_content(fr,"Marihuana",result);
FrakInfo[fr][fMarihuana] = strval(result);
cache_get_field_content(fr,"Mats",result);
FrakInfo[fr][fMats] = strval(result);
cache_get_field_content(fr,"Gangwaffen",result);
FrakInfo[fr][fGangwaffen] = strval(result);
cache_get_field_content(fr,"Rank1lohn",result);
FrakInfo[fr][fR1L] = strval(result);
cache_get_field_content(fr,"Rank2lohn",result);
FrakInfo[fr][fR2L] = strval(result);
cache_get_field_content(fr,"Rank3lohn",result);
FrakInfo[fr][fR3L] = strval(result);
cache_get_field_content(fr,"Rank4lohn",result);
FrakInfo[fr][fR4L] = strval(result);
cache_get_field_content(fr,"Rank5lohn",result);
FrakInfo[fr][fR5L] = strval(result);
cache_get_field_content(fr,"Rank6lohn",result);
FrakInfo[fr][fR6L] = strval(result);
cache_get_field_content(fr,"Rank7lohn",result);
FrakInfo[fr][fR7L] = strval(result);
cache_get_field_content(fr,"Rank8lohn",result);
FrakInfo[fr][fR8L] = strval(result);
cache_get_field_content(fr,"LagerOpen",result);
FrakInfo[fr][fWLO] = strval(result);
cache_get_field_content(fr,"Rank1name",result);
format(FrakInfo[fr][fR1N],24,"%s",result);
cache_get_field_content(fr,"Rank2name",result);
format(FrakInfo[fr][fR2N],24,"%s",result);
cache_get_field_content(fr,"Rank3name",result);
format(FrakInfo[fr][fR3N],24,"%s",result);
cache_get_field_content(fr,"Rank4name",result);
format(FrakInfo[fr][fR4N],24,"%s",result);
cache_get_field_content(fr,"Rank5name",result);
format(FrakInfo[fr][fR5N],24,"%s",result);
cache_get_field_content(fr,"Rank6name",result);
format(FrakInfo[fr][fR6N],24,"%s",result);
cache_get_field_content(fr,"Rank7name",result);
format(FrakInfo[fr][fR7N],24,"%s",result);
cache_get_field_content(fr,"Rank8name",result);
format(FrakInfo[fr][fR8N],24,"%s",result);
cache_get_field_content(fr,"Rank1skin",result);
FrakInfo[fr][fR1S] = strval(result);
cache_get_field_content(fr,"Rank2skin",result);
FrakInfo[fr][fR2S] = strval(result);
cache_get_field_content(fr,"Rank3skin",result);
FrakInfo[fr][fR3S] = strval(result);
cache_get_field_content(fr,"Rank4skin",result);
FrakInfo[fr][fR4S] = strval(result);
cache_get_field_content(fr,"Rank5skin",result);
FrakInfo[fr][fR5S] = strval(result);
cache_get_field_content(fr,"Rank6skin",result);
FrakInfo[fr][fR6S] = strval(result);
cache_get_field_content(fr,"Rank7skin",result);
FrakInfo[fr][fR7S] = strval(result);
cache_get_field_content(fr,"Rank8skin",result);
FrakInfo[fr][fR8S] = strval(result);
cache_get_field_content(fr,"WLX",result);
FrakInfo[fr][fWLX] = floatstr(result);
cache_get_field_content(fr,"WLY",result);
FrakInfo[fr][fWLY] = floatstr(result);
cache_get_field_content(fr,"WLZ",result);
FrakInfo[fr][fWLZ] = floatstr(result);
cache_get_field_content(fr,"PosX",result);
FrakInfo[fr][fPosX] = floatstr(result);
cache_get_field_content(fr,"PosY",result);
FrakInfo[fr][fPosY] = floatstr(result);
cache_get_field_content(fr,"PosZ",result);
FrakInfo[fr][fPosZ] = floatstr(result);
cache_get_field_content(fr,"IntX",result);
FrakInfo[fr][fIntX] = floatstr(result);
cache_get_field_content(fr,"IntY",result);
FrakInfo[fr][fIntY] = floatstr(result);
cache_get_field_content(fr,"IntZ",result);
FrakInfo[fr][fIntZ] = floatstr(result);
cache_get_field_content(fr,"Interior",result);
FrakInfo[fr][fInterior] = strval(result);
cache_get_field_content(fr,"VW",result);
FrakInfo[fr][fVW] = strval(result);
cache_get_field_content(fr,"SpawnX",result);
FrakInfo[fr][fSpawnX] = floatstr(result);
cache_get_field_content(fr,"SpawnY",result);
FrakInfo[fr][fSpawnY] = floatstr(result);
cache_get_field_content(fr,"SpawnZ",result);
FrakInfo[fr][fSpawnZ] = floatstr(result);
cache_get_field_content(fr,"SpawnA",result);
FrakInfo[fr][fSpawnA] = floatstr(result);
cache_get_field_content(fr,"Kokain",result);
FrakInfo[fr][fKokain] = strval(result);
cache_get_field_content(fr,"Carslots",result);
FrakInfo[fr][fCarslots] = strval(result);
FrakInfo[fr][fGWP] = CreateDynamicPickup(1239,1,FrakInfo[fr][fWLiX],FrakInfo[fr][fWLiY],FrakInfo[fr][fWLiZ],FrakInfo[fr][fVW]);
FrakInfo[fr][fEntPickup] = CreateDynamicPickup(1318,1,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ]);
FrakInfo[fr][fExtPickup] = CreateDynamicPickup(1318,1,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],FrakInfo[fr][fVW]);
new strr[128];
//SetTimerEx("LoadFrakVeh",500,0,"d",fr);
switch(fr) {
case 1: {
FrakInfo[fr][fEntLabel] = Create3DTextLabel("San Andreas Police Department Eingang\nGebäude betreten: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_POLICE,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ],10,0,1);
FrakInfo[fr][fExtLabel] = Create3DTextLabel("San Andreas Police Department Ausgang\nGebäude verlassen: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_POLICE,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],10,FrakInfo[fr][fVW],1);
}
case 2: { return 1; }
case 3: { return 1; }
case 4: {
FrakInfo[fr][fEntLabel] = Create3DTextLabel("All Saints General Hospital Eingang\nGebäude betreten: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_MEDIC,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ],10,0,1);
FrakInfo[fr][fExtLabel] = Create3DTextLabel("All Saints General Hospital Ausgang\nGebäude verlassen: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_MEDIC,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],10,FrakInfo[fr][fVW],1);
}
case 5: { return 1; }
case 6: { return 1; }
case 7: { return 1; }
case 8: {
format(strr,128,"%d Gangwaffen\nGangwaffen aus dem Lager nehmen: /gwaffen",FrakInfo[fr][fGangwaffen]);
FrakInfo[fr][fGW] = Create3DTextLabel(strr,COLOR_GROVE,FrakInfo[fr][fWLiX],FrakInfo[fr][fWLiY],FrakInfo[fr][fWLiZ],10,FrakInfo[fr][fVW]);
FrakInfo[fr][fEntLabel] = Create3DTextLabel("Grove Street Base Eingang\nGebäude betreten: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_GROVE,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ],10,0,1);
FrakInfo[fr][fExtLabel] = Create3DTextLabel("Grove Street Base Ausgang\nGebäude verlassen: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_GROVE,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],10,FrakInfo[fr][fVW],1);
}
case 9: {
format(strr,128,"%d Gangwaffen\nGangwaffen aus dem Lager nehmen: /gwaffen",FrakInfo[fr][fGangwaffen]);
FrakInfo[fr][fGW] = Create3DTextLabel(strr,COLOR_BALLAS,FrakInfo[fr][fWLiX],FrakInfo[fr][fWLiY],FrakInfo[fr][fWLiZ],10,FrakInfo[fr][fVW]);
FrakInfo[fr][fEntLabel] = Create3DTextLabel("Ballas Base Eingang\nGebäude betreten: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_BALLAS,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ],10,0,1);
FrakInfo[fr][fExtLabel] = Create3DTextLabel("Ballas Base Ausgang\nGebäude verlassen: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_BALLAS,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],10,FrakInfo[fr][fVW],1);
}
case 10: {
format(strr,128,"%d Gangwaffen\nGangwaffen aus dem Lager nehmen: /gwaffen",FrakInfo[fr][fGangwaffen]);
FrakInfo[fr][fGW] = Create3DTextLabel(strr,COLOR_AZTECAS,FrakInfo[fr][fWLiX],FrakInfo[fr][fWLiY],FrakInfo[fr][fWLiZ],10,FrakInfo[fr][fVW]);
FrakInfo[fr][fEntLabel] = Create3DTextLabel("Los Aztecas Base Eingang\nGebäude betreten: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_AZTECAS,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ],10,0,1);
FrakInfo[fr][fExtLabel] = Create3DTextLabel("Los Aztecas Base Ausgang\nGebäude verlassen: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_AZTECAS,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],10,FrakInfo[fr][fVW],1);
}
case 11: {
format(strr,128,"%d Gangwaffen\nGangwaffen aus dem Lager nehmen: /gwaffen",FrakInfo[fr][fGangwaffen]);
FrakInfo[fr][fGW] = Create3DTextLabel(strr,COLOR_LCN,FrakInfo[fr][fWLiX],FrakInfo[fr][fWLiY],FrakInfo[fr][fWLiZ],10,FrakInfo[fr][fVW]);
FrakInfo[fr][fEntLabel] = Create3DTextLabel("La Cosa Nostra Base Eingang\nGebäude betreten: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_LCN,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ],10,0,1);
FrakInfo[fr][fExtLabel] = Create3DTextLabel("La Cosa Nostra Base Ausgang\nGebäude verlassen: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_LCN,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],10,FrakInfo[fr][fVW],1);
}
case 12: {
format(strr,128,"%d Gangwaffen\nGangwaffen aus dem Lager nehmen: /gwaffen",FrakInfo[fr][fGangwaffen]);
FrakInfo[fr][fGW] = Create3DTextLabel(strr,COLOR_YAKUZA,FrakInfo[fr][fWLiX],FrakInfo[fr][fWLiY],FrakInfo[fr][fWLiZ],10,FrakInfo[fr][fVW]);
FrakInfo[fr][fEntLabel] = Create3DTextLabel("Yakuza Base Eingang\nGebäude betreten: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_YAKUZA,FrakInfo[fr][fPosX],FrakInfo[fr][fPosY],FrakInfo[fr][fPosZ],10,0,1);
FrakInfo[fr][fExtLabel] = Create3DTextLabel("Yakuza Base Ausgang\nGebäude verlassen: ~k~~VEHICLE_ENTER_EXIT~ drücken",COLOR_YAKUZA,FrakInfo[fr][fIntX],FrakInfo[fr][fIntY],FrakInfo[fr][fIntZ],10,FrakInfo[fr][fVW],1);
}
}
printf("<-| [MYSQL-LOAD] Die Fraktion %d wurde erfolgreich geladen - Dauer: %dms",fr,oldtime-GetTickCount());
}
}
Alles anzeigen
Hier die Debugmeldung:
Code
[18:51:23] DEBUG FRAK: cache_get_data(13,50)
[18:51:23] <-| [MYSQL-LOAD] Die Fraktion 0 wurde erfolgreich geladen - Dauer: -1ms
[18:51:23] <-| [MYSQL-LOAD] Die Fraktion 1 wurde erfolgreich geladen - Dauer: -1ms
Wo liegt der Fehler? @Jeffryy:
lg
Deagle