5 Errors die ich nicht weg bekomme

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • 5 Errors die ich nicht weg bekomme

    Closed

    Hallo Liebes Breadfish

    so wie es in den Titel steht habe ich 5 Error und bekomme die nicht weg.

    Hier die Error

    CSS-Quellcode: 5 error

    1. C:\Users\Paddy\Desktop\Live you Life\gamemodes\LyL.pwn(79868) : error 075: input line too long (after substitutions)
    2. C:\Users\Paddy\Desktop\Live you Life\gamemodes\LyL.pwn(79869) : error 037: invalid string (possibly non-terminated string)
    3. C:\Users\Paddy\Desktop\Live you Life\gamemodes\LyL.pwn(79869) : error 017: undefined symbol "UPDATE"
    4. C:\Users\Paddy\Desktop\Live you Life\gamemodes\LyL.pwn(79869) : error 029: invalid expression, assumed zero
    5. C:\Users\Paddy\Desktop\Live you Life\gamemodes\LyL.pwn(79869) : fatal error 107: too many error messages on one line





    und hier die zeile

    Quellcode

    1. , `fFaction2`='%d', `fFaction3`='%d', `fFaction4`='%d', `fFaction5`='%d', `fSpoiler`='%d', `fHood`='%d', `fRoof`='%d', `fSideskirt`='%s', `fLamps`='%d', `fNitro`='%d' \
    2. , `fExhaust`='%d', `fWheel`='%d', `fStereo`='%d', `fHydraulics`='%d', `fFrontBumper`='%d', `fVent1`='%d', `fRearBumper`='%d', `fVent2`='%s', `fPaintjob`='%d', `fPrice`='%d' \


    und hier der ganze code

    CSS-Quellcode

    1. forward SaveAllFracVehs();
    2. public SaveAllFracVehs()
    3. {
    4. //Deklaration neuer temporärer Variablen:
    5. new query[2048];
    6. //Schleife durch alle Fraktions-Fahrzeuge
    7. for(new i=0; i<MAX_FRAC_VEHICLES; i++)
    8. {
    9. //Wenn das Fahrzeug existiert
    10. if(FactionCars[i][fVehid] >= 400 && FactionCars[i][fVehid] <= 611)
    11. {
    12. //Wir fragen die Position des Fahrzeugs ab:
    13. GetVehiclePos(FactionCars[i][fCarid], FactionCars[i][fPos][0], FactionCars[i][fPos][1], FactionCars[i][fPos][2]);
    14. GetVehicleZAngle(FactionCars[i][fCarid], FactionCars[i][fPos][3]);
    15. //Und wir erstellen das Query:
    16. format(query, sizeof(query), "UPDATE `FracVehicles` SET `fVehid`='%s', `fPosX`='%f', `fPosY`='%f', `fPosZ`='%f', `fPosA`='%f', `fCol1`='%d', `fCol2`='%d', `fFaction1`='%d' \
    17. , `fFaction2`='%d', `fFaction3`='%d', `fFaction4`='%d', `fFaction5`='%d', `fSpoiler`='%d', `fHood`='%d', `fRoof`='%d', `fSideskirt`='%s', `fLamps`='%d', `fNitro`='%d' \
    18. , `fExhaust`='%d', `fWheel`='%d', `fStereo`='%d', `fHydraulics`='%d', `fFrontBumper`='%d', `fVent1`='%d', `fRearBumper`='%d', `fVent2`='%s', `fPaintjob`='%d', `fPrice`='%d' \
    19. , `fTankart`='%d', `fGesperrt`='%d', `fMotorschaden`='%d', `fSperrpreis`='%d', `fFrontBumper`='%d', `fVent1`='%d', `fRearBumper`='%d', `fVent2`='%s', `fPaintjob`='%d', `fPrice`='%d' \
    20. WHERE `id` = '%d'",
    21. FactionCars[i][fVehid], FactionCars[i][fPos][0], FactionCars[i][fPos][1], FactionCars[i][fPos][2], FactionCars[i][fPos][3], FactionCars[i][fCol][0], FactionCars[i][fCol][1],
    22. FactionCars[i][fFaction][0], FactionCars[i][fFaction][1], FactionCars[i][fFaction][2], FactionCars[i][fFaction][3], FactionCars[i][fFaction][4], FactionCars[i][fTuning][0],
    23. FactionCars[i][fTuning][1], FactionCars[i][fTuning][2], FactionCars[i][fTuning][3], FactionCars[i][fTuning][4], FactionCars[i][fTuning][5], FactionCars[i][fTuning][6],
    24. FactionCars[i][fTuning][7], FactionCars[i][fTuning][8], FactionCars[i][fTuning][9], FactionCars[i][fTuning][10], FactionCars[i][fTuning][11], FactionCars[i][fTuning][12],
    25. FactionCars[i][fTuning][13], FactionCars[i][fTuning][14], FactionCars[i][fPrice], FactionCars[i][fTankart], FactionCars[i][fGesperrt], FactionCars[i][fMotorschaden],
    26. FactionCars[i][fSperrpreis], i);
    27. //handle = die Connection Handle ID die vor mysql_connect steht.
    28. mysql_tquery(handle, query);
    29. }
    30. }
    31. return 1;
    32. }
    Alles anzeigen


    danke für das helfen

    euer
    RedDragon28080

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von RedDragon28080 ()

  • PAWN-Quellcode

    1. [list=1][*]C:\Users\Paddy\Desktop\Live you Life\gamemodes\LyL.pwn(79868) : error 075: input line too long (after substitutions)
    2. [*]C:\Users\Paddy\Desktop\Live you Life\gamemodes\LyL.pwn(79869) : error 037: invalid string (possibly non-terminated string)
    3. [/list]


    die zeile ist zulang. Drücke nach einem kommar einfach mal enter und schon sind es 2 fehler weniger.
  • RedDragon28080 schrieb:

    und hier die zeile
    Das \ am Ende mach die Zeile zwar leserlich kürzer, allerdings fügt der Compiler das wieder zusammen, was die Zeile wieder für den Compiler zu lang macht.
    Daher musst du den String splitten:

    PAWN-Quellcode

    1. format(query, sizeof(query), "UPDATE `FracVehicles` SET `fVehid`='%s', `fPosX`='%f', `fPosY`='%f', `fPosZ`='%f', `fPosA`='%f', `fCol1`='%d', `fCol2`='%d', `fFaction1`='%d' ",
    2. FactionCars[i][fVehid], FactionCars[i][fPos][0], FactionCars[i][fPos][1], FactionCars[i][fPos][2],
    3. FactionCars[i][fPos][3], FactionCars[i][fCol][0], FactionCars[i][fCol][1],FactionCars[i][fFaction][0]);
    4. format(query, sizeof(query), "%s, `fFaction2`='%d', `fFaction3`='%d', `fFaction4`='%d', `fFaction5`='%d', `fSpoiler`='%d', `fHood`='%d', `fRoof`='%d', `fSideskirt`='%s', `fLamps`='%d', `fNitro`='%d' ", string,
    5. FactionCars[i][fFaction][1], FactionCars[i][fFaction][2], FactionCars[i][fFaction][3], FactionCars[i][fFaction][4], FactionCars[i][fTuning][0],
    6. FactionCars[i][fTuning][1], FactionCars[i][fTuning][2], FactionCars[i][fTuning][3], FactionCars[i][fTuning][4], FactionCars[i][fTuning][5]);
    7. format(query, sizeof(query), "%s, `fExhaust`='%d', `fWheel`='%d', `fStereo`='%d', `fHydraulics`='%d', `fFrontBumper`='%d', `fVent1`='%d', `fRearBumper`='%d', `fVent2`='%s', `fPaintjob`='%d', `fPrice`='%d' ", string,
    8. FactionCars[i][fTuning][6], FactionCars[i][fTuning][7], FactionCars[i][fTuning][8], FactionCars[i][fTuning][9], FactionCars[i][fTuning][10],
    9. FactionCars[i][fTuning][11], FactionCars[i][fTuning][12], FactionCars[i][fTuning][13], FactionCars[i][fTuning][14], FactionCars[i][fPrice]);
    10. format(query, sizeof(query), "%s, `fTankart`='%d', `fGesperrt`='%d', `fMotorschaden`='%d', `fSperrpreis`='%d' ", string,
    11. FactionCars[i][fTankart], FactionCars[i][fGesperrt], FactionCars[i][fMotorschaden], FactionCars[i][fSperrpreis]);
    12. format(query, sizeof(query), "%s WHERE `id` = '%d'", string, i);
    Alles anzeigen


    Alternativ kannst du auch jede Variable in ein extra format schreiben und zusammenfügen, anstatt wie hier immer ein paar. Macht es eventuell leserlicher.
    Also so:

    PAWN-Quellcode

    1. format(query, sizeof(query), "UPDATE `FracVehicles` SET ");
    2. format(query, sizeof(query), "%s`fVehid`='%s', ", string, FactionCars[i][fVehid]);
    3. format(query, sizeof(query), "%s`fPosX`='%f', ", string, FactionCars[i][fPos][0]);
    4. format(query, sizeof(query), "%s`fPosY`='%f', ", string, FactionCars[i][fPos][1]);
    5. //...
    6. format(query, sizeof(query), "%s`fSperrpreis`='%d' ", string, FactionCars[i][fSperrpreis]);
    7. format(query, sizeof(query), "%s WHERE `id` = '%d'", string, i);
  • vielendank Jeffry

    habe aber zu dieses Fraktionscar noch ein Problem und zwar wird nichts im MSQL ertsellt

    hier der code kannst du noich mal rübeschauen und mir sagen wo ich den fehler habe


    PAWN-Quellcode

    1. public OnGameModeInit()
    2. {
    3. LoadFracVehicles();
    4. SetTimer("SaveAllFracVehs", 60000, true);
    5. return 1;
    6. }
    7. LoadFracVehicles()
    8. {
    9. print("LoadFracVehicles 1");
    10. CreateFVTable();
    11. print("LoadFracVehicles 2");
    12. //handle = die Connection Handle ID die vor mysql_connect steht.
    13. //Es wird ein SELECT Query an die Datenbank gesendet, diese gibt über das Callback LoadFracVehicles_Data
    14. //die Daten im Cache zurück.
    15. mysql_tquery(handle, "SELECT * FROM FracVehicles ORDER BY ID ASC", "LoadFracVehicles_Data");
    16. return 1;
    17. }
    18. CreateFVTable()
    19. {
    20. new query[512];
    21. print("Tabelle für FracVehicles erstellt 1");
    22. format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS `FracVehicles` (");
    23. format(query, sizeof(query), "%s`ID` int(11) NOT NULL PRIMARY KEY,", query);
    24. format(query, sizeof(query), "%s `fCarid` int(11) NOT NULL DEFAULT '0',", query);
    25. format(query, sizeof(query), "%s `fVehid` int(11) NOT NULL DEFAULT '0',", query);
    26. format(query, sizeof(query), "%s `fPosX` float NOT NULL DEFAULT '0',", query);
    27. format(query, sizeof(query), "%s `fPosY` float NOT NULL DEFAULT '0',", query);
    28. format(query, sizeof(query), "%s `fPosZ` float NOT NULL DEFAULT '0',", query);
    29. format(query, sizeof(query), "%s `fPosA` float NOT NULL DEFAULT '0',", query);
    30. format(query, sizeof(query), "%s `fCol1` int(11) NOT NULL DEFAULT '0',", query);
    31. format(query, sizeof(query), "%s `fCol2` int(11) NOT NULL DEFAULT '0',", query);
    32. format(query, sizeof(query), "%s `fFaction1` int(11) NOT NULL DEFAULT '-1'", query);
    33. format(query, sizeof(query), "%s `fFaction2` int(11) NOT NULL DEFAULT '-1'", query);
    34. format(query, sizeof(query), "%s `fFaction3` int(11) NOT NULL DEFAULT '-1'", query);
    35. format(query, sizeof(query), "%s `fFaction4` int(11) NOT NULL DEFAULT '-1'", query);
    36. format(query, sizeof(query), "%s `fFaction5` int(11) NOT NULL DEFAULT '-1'", query);
    37. format(query, sizeof(query), "%s `fSpoiler` int(11) NOT NULL DEFAULT '0'", query);
    38. format(query, sizeof(query), "%s `fHood` int(11) NOT NULL DEFAULT '0'", query);
    39. format(query, sizeof(query), "%s `fRoof` int(11) NOT NULL DEFAULT '0'", query);
    40. format(query, sizeof(query), "%s `fSideskirt` int(11) NOT NULL DEFAULT '0'", query);
    41. format(query, sizeof(query), "%s `fLamps` int(11) NOT NULL DEFAULT '0'", query);
    42. format(query, sizeof(query), "%s `fNitro` int(11) NOT NULL DEFAULT '0'", query);
    43. format(query, sizeof(query), "%s `fExhaust` int(11) NOT NULL DEFAULT '0'", query);
    44. format(query, sizeof(query), "%s `fWheel` int(11) NOT NULL DEFAULT '0'", query);
    45. format(query, sizeof(query), "%s `fStereo` int(11) NOT NULL DEFAULT '0'", query);
    46. format(query, sizeof(query), "%s `fHydraulics` int(11) NOT NULL DEFAULT '0'", query);
    47. format(query, sizeof(query), "%s `fFrontBumper` int(11) NOT NULL DEFAULT '0'", query);
    48. format(query, sizeof(query), "%s `fVent1` int(11) NOT NULL DEFAULT '0'", query);
    49. format(query, sizeof(query), "%s `fRearBumper` int(11) NOT NULL DEFAULT '0'", query);
    50. format(query, sizeof(query), "%s `fVent2` int(11) NOT NULL DEFAULT '0'", query);
    51. format(query, sizeof(query), "%s `fPaintjob` int(11) NOT NULL DEFAULT '0'", query);
    52. format(query, sizeof(query), "%s `fPrice` int(11) NOT NULL DEFAULT '0'", query);
    53. format(query, sizeof(query), "%s `fTankart` int(11) NOT NULL DEFAULT '0'", query);
    54. format(query, sizeof(query), "%s `fGesperrt` int(11) NOT NULL DEFAULT '0'", query);
    55. format(query, sizeof(query), "%s `fMotorschaden` int(11) NOT NULL DEFAULT '0'", query);
    56. format(query, sizeof(query), "%s `fSperrpreis` int(11) NOT NULL DEFAULT '0'", query);
    57. format(query, sizeof(query), "%s) ENGINE=InnoDB DEFAULT CHARSET=latin1;", query);
    58. //handle = die Connection Handle ID die vor mysql_connect steht.
    59. mysql_tquery(handle, query);
    60. print("Tabelle für FracVehicles erstellt 2");
    61. return 1;
    62. }
    63. dcmd_efa(playerid,params[])
    64. {
    65. new query[256];
    66. if(Spielerinfo[playerid][pAdmin] >= 3)
    67. {
    68. if(AdminDuty[playerid] == 1)
    69. {
    70. new vehid,faction[5];
    71. if(!sscanf(params,"dd",vehid,faction[0]))
    72. {
    73. sscanf(params,"dddddd",vehid,faction[0],faction[1],faction[2],faction[3],faction[4]);
    74. if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400 bis 611.");
    75. if(faction[0] && faction[0] <= MAX_FACTIONS)
    76. {
    77. printf("params: %s", params);
    78. printf("faction0: %d", faction[0]);
    79. for(new f=1;f<5;f++)
    80. {
    81. if(faction[f] <= 1 || faction[f] > MAX_FACTIONS)
    82. {
    83. printf("Setze %d auf -255", f);
    84. faction[f] = -255;
    85. }
    86. }
    87. for(new fc;fc<sizeof(FactionCars);fc++)
    88. {
    89. if(FactionCars[fc][fVehid] < 400 || FactionCars[fc][fVehid] > 611)
    90. {
    91. FactionCars[fc][fVehid] = vehid;
    92. new Float:fX,Float:fY,Float:fZ,Float:fA;
    93. GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
    94. FactionCars[fc][fPos][0] = fX;
    95. FactionCars[fc][fPos][1] = fY;
    96. FactionCars[fc][fPos][2] = fZ;
    97. FactionCars[fc][fPos][3] = fA;
    98. new Color[2];
    99. GetDefaultCarColorOfFaction(GetPlayerLeader(playerid),Color[0],Color[1]);
    100. FactionCars[fc][fCol][0] = Color[0];
    101. FactionCars[fc][fCol][1] = Color[1];
    102. for(new f;f<5;f++)
    103. {
    104. printf("f%d = %d", f, faction[f]);
    105. FactionCars[fc][fFaction][f] = faction[f];
    106. printf("f%d set %d", f, FactionCars[fc][fFaction][f]);
    107. }
    108. new fTankartig = 1+ random(3);
    109. FactionCars[fc][fTankart] = fTankartig;
    110. for(new i = 0; i < sizeof(FactionBuylist); i++)
    111. {
    112. if(FactionCars[fc][fVehid] == FactionBuylist[i][fbVehid])
    113. {
    114. FactionCars[fc][fPrice] = FactionBuylist[i][fbPrice];
    115. break;
    116. }
    117. }
    118. format(query, sizeof(query), "INSERT INTO `FracVehicles` (`ID`, `fVehid`, `fPosX`, `fPosY`, `fPosZ`, `fPosA`, `fCol1`, `fCol2`, `fFaction1`, `fPrice`, `fTankart`) VALUES ('%d', '%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', '%d')",
    119. fc, FactionCars[fc][fVehid], FactionCars[fc][fPos][0], FactionCars[fc][fPos][1], FactionCars[fc][fPos][2], FactionCars[fc][fPos][3], FactionCars[fc][fCol][0], FactionCars[fc][fCol][1], FactionCars[fc][fFaction][0],
    120. FactionCars[fc][fPrice], FactionCars[fc][fTankart]);
    121. mysql_tquery(handle, query);
    122. FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-1);
    123. printf("Carid: %d", FactionCars[fc][fCarid]);
    124. new pstring[128];
    125. new randomplate = 1 + random(20);
    126. format(pstring,sizeof(pstring),"%s %d",Factions[FactionCars[fc][fFaction][0]],randomplate);
    127. printf("pstring: %s", pstring);
    128. SetVehicleNumberPlate(FactionCars[fc][fCarid], pstring);
    129. SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich erstellt.");
    130. PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
    131. printf("Fertig.");
    132. return true;
    133. }
    134. }
    135. SendClientMessage(playerid,FACTION_COL_GREY,"Die Maximale Anzahl von Fraktionsfahrzeugen wurde bereits erreicht.");
    136. }
    137. else SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Fraktion!");
    138. }
    139. else SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Hauptfraktion]'.");
    140. }
    141. else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht im Admindienst");
    142. }
    143. return 1;
    144. }
    Alles anzeigen
    danke schön nochmal
  • Probier es mal so

    PAWN-Quellcode

    1. public OnGameModeInit()
    2. {
    3. LoadFracVehicles();
    4. SetTimer("SaveAllFracVehs", 60000, true);
    5. return 1;
    6. }
    7. LoadFracVehicles()
    8. {
    9. print("LoadFracVehicles 1");
    10. CreateFVTable();
    11. print("LoadFracVehicles 2");
    12. //handle = die Connection Handle ID die vor mysql_connect steht.
    13. //Es wird ein SELECT Query an die Datenbank gesendet, diese gibt über das Callback LoadFracVehicles_Data
    14. //die Daten im Cache zurück.
    15. mysql_pquery(handle, "SELECT * FROM FracVehicles ORDER BY ID ASC", "LoadFracVehicles_Data");
    16. return 1;
    17. }
    18. CreateFVTable()
    19. {
    20. new query[512];
    21. print("Tabelle für FracVehicles erstellt 1");
    22. format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS `FracVehicles` (");
    23. format(query, sizeof(query), "%s`ID` int(11) NOT NULL PRIMARY KEY,", query);
    24. format(query, sizeof(query), "%s `fCarid` int(11) NOT NULL DEFAULT '0',", query);
    25. format(query, sizeof(query), "%s `fVehid` int(11) NOT NULL DEFAULT '0',", query);
    26. format(query, sizeof(query), "%s `fPosX` float NOT NULL DEFAULT '0',", query);
    27. format(query, sizeof(query), "%s `fPosY` float NOT NULL DEFAULT '0',", query);
    28. format(query, sizeof(query), "%s `fPosZ` float NOT NULL DEFAULT '0',", query);
    29. format(query, sizeof(query), "%s `fPosA` float NOT NULL DEFAULT '0',", query);
    30. format(query, sizeof(query), "%s `fCol1` int(11) NOT NULL DEFAULT '0',", query);
    31. format(query, sizeof(query), "%s `fCol2` int(11) NOT NULL DEFAULT '0',", query);
    32. format(query, sizeof(query), "%s `fFaction1` int(11) NOT NULL DEFAULT '-1'", query);
    33. format(query, sizeof(query), "%s `fFaction2` int(11) NOT NULL DEFAULT '-1'", query);
    34. format(query, sizeof(query), "%s `fFaction3` int(11) NOT NULL DEFAULT '-1'", query);
    35. format(query, sizeof(query), "%s `fFaction4` int(11) NOT NULL DEFAULT '-1'", query);
    36. format(query, sizeof(query), "%s `fFaction5` int(11) NOT NULL DEFAULT '-1'", query);
    37. format(query, sizeof(query), "%s `fSpoiler` int(11) NOT NULL DEFAULT '0'", query);
    38. format(query, sizeof(query), "%s `fHood` int(11) NOT NULL DEFAULT '0'", query);
    39. format(query, sizeof(query), "%s `fRoof` int(11) NOT NULL DEFAULT '0'", query);
    40. format(query, sizeof(query), "%s `fSideskirt` int(11) NOT NULL DEFAULT '0'", query);
    41. format(query, sizeof(query), "%s `fLamps` int(11) NOT NULL DEFAULT '0'", query);
    42. format(query, sizeof(query), "%s `fNitro` int(11) NOT NULL DEFAULT '0'", query);
    43. format(query, sizeof(query), "%s `fExhaust` int(11) NOT NULL DEFAULT '0'", query);
    44. format(query, sizeof(query), "%s `fWheel` int(11) NOT NULL DEFAULT '0'", query);
    45. format(query, sizeof(query), "%s `fStereo` int(11) NOT NULL DEFAULT '0'", query);
    46. format(query, sizeof(query), "%s `fHydraulics` int(11) NOT NULL DEFAULT '0'", query);
    47. format(query, sizeof(query), "%s `fFrontBumper` int(11) NOT NULL DEFAULT '0'", query);
    48. format(query, sizeof(query), "%s `fVent1` int(11) NOT NULL DEFAULT '0'", query);
    49. format(query, sizeof(query), "%s `fRearBumper` int(11) NOT NULL DEFAULT '0'", query);
    50. format(query, sizeof(query), "%s `fVent2` int(11) NOT NULL DEFAULT '0'", query);
    51. format(query, sizeof(query), "%s `fPaintjob` int(11) NOT NULL DEFAULT '0'", query);
    52. format(query, sizeof(query), "%s `fPrice` int(11) NOT NULL DEFAULT '0'", query);
    53. format(query, sizeof(query), "%s `fTankart` int(11) NOT NULL DEFAULT '0'", query);
    54. format(query, sizeof(query), "%s `fGesperrt` int(11) NOT NULL DEFAULT '0'", query);
    55. format(query, sizeof(query), "%s `fMotorschaden` int(11) NOT NULL DEFAULT '0'", query);
    56. format(query, sizeof(query), "%s `fSperrpreis` int(11) NOT NULL DEFAULT '0'", query);
    57. format(query, sizeof(query), "%s) ENGINE=InnoDB DEFAULT CHARSET=latin1;", query);
    58. //handle = die Connection Handle ID die vor mysql_connect steht.
    59. mysql_pquery(handle, query);
    60. print("Tabelle für FracVehicles erstellt 2");
    61. return 1;
    62. }
    63. dcmd_efa(playerid,params[])
    64. {
    65. new query[256];
    66. if(Spielerinfo[playerid][pAdmin] >= 3)
    67. {
    68. if(AdminDuty[playerid] == 1)
    69. {
    70. new vehid,faction[5];
    71. if(!sscanf(params,"dd",vehid,faction[0]))
    72. {
    73. sscanf(params,"dddddd",vehid,faction[0],faction[1],faction[2],faction[3],faction[4]);
    74. if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400 bis 611.");
    75. if(faction[0] && faction[0] <= MAX_FACTIONS)
    76. {
    77. printf("params: %s", params);
    78. printf("faction0: %d", faction[0]);
    79. for(new f=1;f<5;f++)
    80. {
    81. if(faction[f] <= 1 || faction[f] > MAX_FACTIONS)
    82. {
    83. printf("Setze %d auf -255", f);
    84. faction[f] = -255;
    85. }
    86. }
    87. for(new fc;fc<sizeof(FactionCars);fc++)
    88. {
    89. if(FactionCars[fc][fVehid] < 400 || FactionCars[fc][fVehid] > 611)
    90. {
    91. FactionCars[fc][fVehid] = vehid;
    92. new Float:fX,Float:fY,Float:fZ,Float:fA;
    93. GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
    94. FactionCars[fc][fPos][0] = fX;
    95. FactionCars[fc][fPos][1] = fY;
    96. FactionCars[fc][fPos][2] = fZ;
    97. FactionCars[fc][fPos][3] = fA;
    98. new Color[2];
    99. GetDefaultCarColorOfFaction(GetPlayerLeader(playerid),Color[0],Color[1]);
    100. FactionCars[fc][fCol][0] = Color[0];
    101. FactionCars[fc][fCol][1] = Color[1];
    102. for(new f;f<5;f++)
    103. {
    104. printf("f%d = %d", f, faction[f]);
    105. FactionCars[fc][fFaction][f] = faction[f];
    106. printf("f%d set %d", f, FactionCars[fc][fFaction][f]);
    107. }
    108. new fTankartig = 1+ random(3);
    109. FactionCars[fc][fTankart] = fTankartig;
    110. for(new i = 0; i < sizeof(FactionBuylist); i++)
    111. {
    112. if(FactionCars[fc][fVehid] == FactionBuylist[i][fbVehid])
    113. {
    114. FactionCars[fc][fPrice] = FactionBuylist[i][fbPrice];
    115. break;
    116. }
    117. }
    118. format(query, sizeof(query), "INSERT INTO `FracVehicles` (`ID`, `fVehid`, `fPosX`, `fPosY`, `fPosZ`, `fPosA`, `fCol1`, `fCol2`, `fFaction1`, `fPrice`, `fTankart`) VALUES ('%d', '%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', '%d')",
    119. fc, FactionCars[fc][fVehid], FactionCars[fc][fPos][0], FactionCars[fc][fPos][1], FactionCars[fc][fPos][2], FactionCars[fc][fPos][3], FactionCars[fc][fCol][0], FactionCars[fc][fCol][1], FactionCars[fc][fFaction][0],
    120. FactionCars[fc][fPrice], FactionCars[fc][fTankart]);
    121. mysql_tquery(handle, query);
    122. FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-1);
    123. printf("Carid: %d", FactionCars[fc][fCarid]);
    124. new pstring[128];
    125. new randomplate = 1 + random(20);
    126. format(pstring,sizeof(pstring),"%s %d",Factions[FactionCars[fc][fFaction][0]],randomplate);
    127. printf("pstring: %s", pstring);
    128. SetVehicleNumberPlate(FactionCars[fc][fCarid], pstring);
    129. SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich erstellt.");
    130. PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
    131. printf("Fertig.");
    132. return true;
    133. }
    134. }
    135. SendClientMessage(playerid,FACTION_COL_GREY,"Die Maximale Anzahl von Fraktionsfahrzeugen wurde bereits erreicht.");
    136. }
    137. else SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Fraktion!");
    138. }
    139. else SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Hauptfraktion]'.");
    140. }
    141. else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht im Admindienst");
    142. }
    143. return 1;
    144. }
    Alles anzeigen
  • Jeffry schrieb:

    Lösche den Log, führe dann das aus was nicht funktioniert, und poste dann den Log nochmal.
    Das wahr schon der neuste von einen restart habe jetzt aber was ausgeklammert

    Quellcode

    1. [09:54:43 03/07/17] [ERROR] mysql_pquery - invalid connection handle (id: 0)
    2. [09:54:43 03/07/17] [ERROR] mysql_pquery - invalid connection handle (id: 0)
    3. [09:54:43 03/07/17] [DEBUG] mysql_connect - host: "localhost", user: "samp6231", database: "samp6231_samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2
    4. [09:54:43 03/07/17] [DEBUG] CMySQLHandle::Create - creating new connection..
    5. [09:54:43 03/07/17] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    6. [09:54:43 03/07/17] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
    7. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    8. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    9. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    10. [09:54:43 03/07/17] [DEBUG] mysql_errno - connection: 1
    11. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    12. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    13. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    14. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    15. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    16. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    17. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    18. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    19. [09:54:43 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    Alles anzeigen
    ich versuche gerade es so zu machen das meine Fraktionscars über MSQl speichern un d nicht über dini
  • Dein Fehler aktuell

    Spoiler anzeigen

    1. [09:54:43 03/07/17] [ERROR] mysql_pquery - invalid connection handle (id: 0)
    2. [09:54:43 03/07/17] [ERROR] mysql_pquery - invalid connection handle (id: 0)


    Okay mein Code hat dir nicht weiter geholfen. Allerdings weiß ich in welchen funktionen der fehler liegt, Da können andere vllt besser helfen


    PAWN-Quellcode

    1. [list=1][*]LoadFracVehicles()
    2. [*]{
    3. [*] print("LoadFracVehicles 1");
    4. [*] CreateFVTable();
    5. [*] print("LoadFracVehicles 2");
    6. [*] //handle = die Connection Handle ID die vor mysql_connect steht.
    7. [*] //Es wird ein SELECT Query an die Datenbank gesendet, diese gibt über das Callback LoadFracVehicles_Data
    8. [*] //die Daten im Cache zurück.
    9. [*] [color=#FF0000]mysql_pquery(handle, "SELECT * FROM FracVehicles ORDER BY ID ASC", "LoadFracVehicles_Data");[/color]
    10. [*] return 1;
    11. [*]}
    12. [/list]
    Alles anzeigen


    PAWN-Quellcode

    1. [list=1][*]CreateFVTable()
    2. [*]{
    3. [*] new query[512];
    4. [*] print("Tabelle für FracVehicles erstellt 1");
    5. [*] format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS `FracVehicles` (");
    6. [*] format(query, sizeof(query), "%s`ID` int(11) NOT NULL PRIMARY KEY,", query);
    7. [*] format(query, sizeof(query), "%s `fCarid` int(11) NOT NULL DEFAULT '0',", query);
    8. [*] format(query, sizeof(query), "%s `fVehid` int(11) NOT NULL DEFAULT '0',", query);
    9. [*] format(query, sizeof(query), "%s `fPosX` float NOT NULL DEFAULT '0',", query);
    10. [*] format(query, sizeof(query), "%s `fPosY` float NOT NULL DEFAULT '0',", query);
    11. [*] format(query, sizeof(query), "%s `fPosZ` float NOT NULL DEFAULT '0',", query);
    12. [*] format(query, sizeof(query), "%s `fPosA` float NOT NULL DEFAULT '0',", query);
    13. [*] format(query, sizeof(query), "%s `fCol1` int(11) NOT NULL DEFAULT '0',", query);
    14. [*] format(query, sizeof(query), "%s `fCol2` int(11) NOT NULL DEFAULT '0',", query);
    15. [*] format(query, sizeof(query), "%s `fFaction1` int(11) NOT NULL DEFAULT '-1'", query);
    16. [*] format(query, sizeof(query), "%s `fFaction2` int(11) NOT NULL DEFAULT '-1'", query);
    17. [*] format(query, sizeof(query), "%s `fFaction3` int(11) NOT NULL DEFAULT '-1'", query);
    18. [*] format(query, sizeof(query), "%s `fFaction4` int(11) NOT NULL DEFAULT '-1'", query);
    19. [*] format(query, sizeof(query), "%s `fFaction5` int(11) NOT NULL DEFAULT '-1'", query);
    20. [*] format(query, sizeof(query), "%s `fSpoiler` int(11) NOT NULL DEFAULT '0'", query);
    21. [*] format(query, sizeof(query), "%s `fHood` int(11) NOT NULL DEFAULT '0'", query);
    22. [*] format(query, sizeof(query), "%s `fRoof` int(11) NOT NULL DEFAULT '0'", query);
    23. [*] format(query, sizeof(query), "%s `fSideskirt` int(11) NOT NULL DEFAULT '0'", query);
    24. [*] format(query, sizeof(query), "%s `fLamps` int(11) NOT NULL DEFAULT '0'", query);
    25. [*] format(query, sizeof(query), "%s `fNitro` int(11) NOT NULL DEFAULT '0'", query);
    26. [*] format(query, sizeof(query), "%s `fExhaust` int(11) NOT NULL DEFAULT '0'", query);
    27. [*] format(query, sizeof(query), "%s `fWheel` int(11) NOT NULL DEFAULT '0'", query);
    28. [*] format(query, sizeof(query), "%s `fStereo` int(11) NOT NULL DEFAULT '0'", query);
    29. [*] format(query, sizeof(query), "%s `fHydraulics` int(11) NOT NULL DEFAULT '0'", query);
    30. [*] format(query, sizeof(query), "%s `fFrontBumper` int(11) NOT NULL DEFAULT '0'", query);
    31. [*] format(query, sizeof(query), "%s `fVent1` int(11) NOT NULL DEFAULT '0'", query);
    32. [*] format(query, sizeof(query), "%s `fRearBumper` int(11) NOT NULL DEFAULT '0'", query);
    33. [*] format(query, sizeof(query), "%s `fVent2` int(11) NOT NULL DEFAULT '0'", query);
    34. [*] format(query, sizeof(query), "%s `fPaintjob` int(11) NOT NULL DEFAULT '0'", query);
    35. [*] format(query, sizeof(query), "%s `fPrice` int(11) NOT NULL DEFAULT '0'", query);
    36. [*] format(query, sizeof(query), "%s `fTankart` int(11) NOT NULL DEFAULT '0'", query);
    37. [*] format(query, sizeof(query), "%s `fGesperrt` int(11) NOT NULL DEFAULT '0'", query);
    38. [*] format(query, sizeof(query), "%s `fMotorschaden` int(11) NOT NULL DEFAULT '0'", query);
    39. [*] format(query, sizeof(query), "%s `fSperrpreis` int(11) NOT NULL DEFAULT '0'", query);
    40. [*] format(query, sizeof(query), "%s) ENGINE=InnoDB DEFAULT CHARSET=latin1;", query);
    41. [*] //handle = die Connection Handle ID die vor mysql_connect steht.
    42. [*] [color=#FF0000]mysql_pquery(handle, query);[/color]
    43. [*] print("Tabelle für FracVehicles erstellt 2");
    44. [*] return 1;
    45. [*]}
    46. [/list]
    Alles anzeigen

  • RedDragon28080 schrieb:

    [09:54:43 03/07/17] [ERROR] mysql_pquery - invalid connection handle (id: 0)
    [09:54:43 03/07/17] [ERROR] mysql_pquery - invalid connection handle (id: 0)
    [09:54:43 03/07/17] [DEBUG] mysql_connect - host: "localhost", user: "samp6231", database: "samp6231_samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2
    Das Problem ist, dass du mysql_pquery ausführst, bevor du mit mysql_connect eine Verbindung aufbaust.
    Setze mysql_connect ganz oben unter OnGameModeInit hin, dann ist das Problem behoben.
  • danke Jeffry

    habe das letzte problem und zwar wir das Fahrzeug erstellt und geladen aber es wird nicht gespeichert

    CSS-Quellcode: msql_log

    1. [22:30:45 03/07/17] [DEBUG] mysql_connect - host: "localhost", user: "samp6231", database: "samp6231_samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2
    2. [22:30:45 03/07/17] [DEBUG] CMySQLHandle::Create - creating new connection..
    3. [22:30:45 03/07/17] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    4. [22:30:45 03/07/17] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
    5. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    6. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    7. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    8. [22:30:45 03/07/17] [DEBUG] mysql_errno - connection: 1
    9. [22:30:45 03/07/17] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM FracVehicles ORDER BY ID ASC", callback: "LoadFracVehicles_Data", format: "(null)"
    10. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    11. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    12. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    13. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    14. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    15. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    16. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    17. [22:30:45 03/07/17] [DEBUG] CMySQLQuery::Execute[LoadFracVehicles_Data] - starting query execution
    18. [22:30:45 03/07/17] [DEBUG] CMySQLQuery::Execute[LoadFracVehicles_Data] - query was successfully executed within 0.69 milliseconds
    19. [22:30:45 03/07/17] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    20. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    21. [22:30:45 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    22. [22:30:45 03/07/17] [DEBUG] Calling callback "LoadFracVehicles_Data"..
    23. [22:30:45 03/07/17] [DEBUG] cache_get_row_count - connection: 1
    24. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
    25. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "1"
    26. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fCarid", connection: 1
    27. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fCarid", data: "0"
    28. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fVehid", connection: 1
    29. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fVehid", data: "560"
    30. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosX", connection: 1
    31. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosX", data: "1553.79"
    32. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosY", connection: 1
    33. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosY", data: "-1739.51"
    34. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosZ", connection: 1
    35. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosZ", data: "13.5469"
    36. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosA", connection: 1
    37. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosA", data: "73.2695"
    38. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fCol1", connection: 1
    39. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fCol1", data: "-1"
    40. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fCol2", connection: 1
    41. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fCol2", data: "-1"
    42. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction1", connection: 1
    43. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction1", data: "1"
    44. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction2", connection: 1
    45. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction2", data: "0"
    46. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction3", connection: 1
    47. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction3", data: "0"
    48. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction4", connection: 1
    49. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction4", data: "0"
    50. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction5", connection: 1
    51. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction5", data: "0"
    52. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fSpoiler", connection: 1
    53. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fSpoiler", data: "0"
    54. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fHood", connection: 1
    55. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fHood", data: "0"
    56. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fRoof", connection: 1
    57. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fRoof", data: "0"
    58. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fSideskirt", connection: 1
    59. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fSideskirt", data: "0"
    60. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fLamps", connection: 1
    61. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fLamps", data: "0"
    62. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fNitro", connection: 1
    63. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fNitro", data: "0"
    64. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fExhaust", connection: 1
    65. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fExhaust", data: "0"
    66. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fWheel", connection: 1
    67. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fWheel", data: "0"
    68. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fStereo", connection: 1
    69. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fStereo", data: "0"
    70. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fHydraulics", connection: 1
    71. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fHydraulics", data: "0"
    72. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFrontBumper", connection: 1
    73. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFrontBumper", data: "0"
    74. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fVent1", connection: 1
    75. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fVent1", data: "0"
    76. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fRearBumper", connection: 1
    77. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fRearBumper", data: "0"
    78. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fVent2", connection: 1
    79. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fVent2", data: "0"
    80. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fPaintjob", connection: 1
    81. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPaintjob", data: "0"
    82. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fPrice", connection: 1
    83. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPrice", data: "300000"
    84. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fTankart", connection: 1
    85. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fTankart", data: "1"
    86. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fGesperrt", connection: 1
    87. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fGesperrt", data: "0"
    88. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fMotorschaden", connection: 1
    89. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fMotorschaden", data: "0"
    90. [22:30:45 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fSperrpreis", connection: 1
    91. [22:30:45 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fSperrpreis", data: "0"
    92. [22:30:45 03/07/17] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    93. [22:31:47 03/07/17] [DEBUG] mysql_pquery - connection: 1, query: " WHERE `id` = '1'", callback: "(null)", format: "(null)"
    94. [22:31:47 03/07/17] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    95. [22:31:47 03/07/17] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `id` = '1'' at line 1 (Query: " WHERE `id` = '1'")
    96. [22:31:47 03/07/17] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
    Alles anzeigen
    und hier die Speicher Codes

    PAWN-Quellcode: SaveFracVehCheck

    1. stock SaveFracVehCheck(vehicleid)
    2. {
    3. //Deklaration neuer temporärer Variablen:
    4. new query[3048],string[3048];
    5. //Schleife durch alle Fraktions-Fahrzeuge
    6. for(new i=0; i<MAX_FRAC_VEHICLES; i++)
    7. {
    8. //Wenn die vehicleid die gleiche ist, wie die des Fraktions-Fahrzeugs
    9. if(FactionCars[i][fCarid] == vehicleid)
    10. {
    11. //Wir fragen die Position des Fahrzeugs ab:
    12. GetVehiclePos(FactionCars[i][fCarid], FactionCars[i][fPos][0], FactionCars[i][fPos][1], FactionCars[i][fPos][2]);
    13. GetVehicleZAngle(FactionCars[i][fCarid], FactionCars[i][fPos][3]);
    14. //Und wir erstellen das Query:
    15. format(query, sizeof(query), "UPDATE FracVehicles SET");
    16. format(query, sizeof(query), "%s`fVehid`='%s', ", string, FactionCars[i][fVehid]);
    17. format(query, sizeof(query), "%s`fPosX`='%f', ", string, FactionCars[i][fPos][0]);
    18. format(query, sizeof(query), "%s`fPosY`='%f', ", string, FactionCars[i][fPos][1]);
    19. format(query, sizeof(query), "%s`fPosZ`='%f', ", string, FactionCars[i][fPos][2]);
    20. format(query, sizeof(query), "%s`fPosA`='%f', ", string, FactionCars[i][fPos][3]);
    21. format(query, sizeof(query), "%s`fCol1`='%d' ", string, FactionCars[i][fCol][0]);
    22. format(query, sizeof(query), "%s`fCol2`='%d' ", string, FactionCars[i][fCol][1]);
    23. format(query, sizeof(query), "%s`fFaction1`='%d' ", string, FactionCars[i][fFaction][0]);
    24. format(query, sizeof(query), "%s`fFaction2`='%d' ", string, FactionCars[i][fFaction][1]);
    25. format(query, sizeof(query), "%s`fFaction3`='%d' ", string, FactionCars[i][fFaction][2]);
    26. format(query, sizeof(query), "%s`fFaction4`='%d' ", string, FactionCars[i][fFaction][3]);
    27. format(query, sizeof(query), "%s`fFaction5`='%d' ", string, FactionCars[i][fFaction][4]);
    28. format(query, sizeof(query), "%s`fSpoiler`='%d' ", string, FactionCars[i][fTuning][0]);
    29. format(query, sizeof(query), "%s`fHood`='%d' ", string, FactionCars[i][fTuning][1]);
    30. format(query, sizeof(query), "%s`fRoof`='%d' ", string, FactionCars[i][fTuning][2]);
    31. format(query, sizeof(query), "%s`fSideskirt`='%d' ", string, FactionCars[i][fTuning][3]);
    32. format(query, sizeof(query), "%s`fLamps`='%d' ", string, FactionCars[i][fTuning][4]);
    33. format(query, sizeof(query), "%s`fNitro`='%d' ", string, FactionCars[i][fTuning][5]);
    34. format(query, sizeof(query), "%s`fExhaust`='%d' ", string, FactionCars[i][fTuning][6]);
    35. format(query, sizeof(query), "%s`fWheel`='%d' ", string, FactionCars[i][fTuning][7]);
    36. format(query, sizeof(query), "%s`fStereo`='%d' ", string, FactionCars[i][fTuning][8]);
    37. format(query, sizeof(query), "%s`fHydraulics`='%d' ", string, FactionCars[i][fTuning][9]);
    38. format(query, sizeof(query), "%s`fFrontBumper`='%d' ", string, FactionCars[i][fTuning][10]);
    39. format(query, sizeof(query), "%s`fVent1`='%d' ", string, FactionCars[i][fTuning][11]);
    40. format(query, sizeof(query), "%s`fRearBumper`='%d' ", string, FactionCars[i][fTuning][12]);
    41. format(query, sizeof(query), "%s`fVent2`='%d' ", string, FactionCars[i][fTuning][13]);
    42. format(query, sizeof(query), "%s`fPaintjob`='%d' ", string, FactionCars[i][fTuning][14]);
    43. format(query, sizeof(query), "%s`fPrice`='%d' ", string, FactionCars[i][fPrice]);
    44. format(query, sizeof(query), "%s`fTankart`='%d' ", string, FactionCars[i][fTankart]);
    45. format(query, sizeof(query), "%s`fGesperrt`='%d' ", string, FactionCars[i][fGesperrt]);
    46. format(query, sizeof(query), "%s`fMotorschaden`='%d' ", string, FactionCars[i][fMotorschaden]);
    47. format(query, sizeof(query), "%s`fSperrpreis`='%d' ", string, FactionCars[i][fSperrpreis]);
    48. format(query, sizeof(query), "%s WHERE `id` = '%d'", string, i);
    49. //handle = die Connection Handle ID die vor mysql_connect steht.
    50. mysql_pquery(handle, query);
    51. return 1; //Es gibt ja keine zwei gleichen Fahrzeuge
    52. }
    53. }
    54. return 0; //Fahrzeug ist kein Fraktions-Fahrzeug
    55. }
    Alles anzeigen

    PAWN-Quellcode: SaveAllFracVehs

    1. forward SaveAllFracVehs();
    2. public SaveAllFracVehs()
    3. {
    4. //Deklaration neuer temporärer Variablen:
    5. new query[3048],string[250];
    6. //Schleife durch alle Fraktions-Fahrzeuge
    7. for(new i=0; i<MAX_FRAC_VEHICLES; i++)
    8. {
    9. //Wenn das Fahrzeug existiert
    10. if(FactionCars[i][fVehid] >= 400 && FactionCars[i][fVehid] <= 611)
    11. {
    12. //Wir fragen die Position des Fahrzeugs ab:
    13. GetVehiclePos(FactionCars[i][fCarid], FactionCars[i][fPos][0], FactionCars[i][fPos][1], FactionCars[i][fPos][2]);
    14. GetVehicleZAngle(FactionCars[i][fCarid], FactionCars[i][fPos][3]);
    15. //Und wir erstellen das Query:
    16. format(query, sizeof(query), "UPDATE `FracVehicles` SET ");
    17. format(query, sizeof(query), "%s`fVehid`='%s', ", string, FactionCars[i][fVehid]);
    18. format(query, sizeof(query), "%s`fPosX`='%f', ", string, FactionCars[i][fPos][0]);
    19. format(query, sizeof(query), "%s`fPosY`='%f', ", string, FactionCars[i][fPos][1]);
    20. format(query, sizeof(query), "%s`fPosZ`='%f', ", string, FactionCars[i][fPos][2]);
    21. format(query, sizeof(query), "%s`fPosA`='%f', ", string, FactionCars[i][fPos][3]);
    22. format(query, sizeof(query), "%s`fCol1`='%d' ", string, FactionCars[i][fCol][0]);
    23. format(query, sizeof(query), "%s`fCol2`='%d' ", string, FactionCars[i][fCol][1]);
    24. format(query, sizeof(query), "%s`fFaction1`='%d' ", string, FactionCars[i][fFaction][0]);
    25. format(query, sizeof(query), "%s`fFaction2`='%d' ", string, FactionCars[i][fFaction][1]);
    26. format(query, sizeof(query), "%s`fFaction3`='%d' ", string, FactionCars[i][fFaction][2]);
    27. format(query, sizeof(query), "%s`fFaction4`='%d' ", string, FactionCars[i][fFaction][3]);
    28. format(query, sizeof(query), "%s`fFaction5`='%d' ", string, FactionCars[i][fFaction][4]);
    29. format(query, sizeof(query), "%s`fSpoiler`='%d' ", string, FactionCars[i][fTuning][0]);
    30. format(query, sizeof(query), "%s`fHood`='%d' ", string, FactionCars[i][fTuning][1]);
    31. format(query, sizeof(query), "%s`fRoof`='%d' ", string, FactionCars[i][fTuning][2]);
    32. format(query, sizeof(query), "%s`fSideskirt`='%d' ", string, FactionCars[i][fTuning][3]);
    33. format(query, sizeof(query), "%s`fLamps`='%d' ", string, FactionCars[i][fTuning][4]);
    34. format(query, sizeof(query), "%s`fNitro`='%d' ", string, FactionCars[i][fTuning][5]);
    35. format(query, sizeof(query), "%s`fExhaust`='%d' ", string, FactionCars[i][fTuning][6]);
    36. format(query, sizeof(query), "%s`fWheel`='%d' ", string, FactionCars[i][fTuning][7]);
    37. format(query, sizeof(query), "%s`fStereo`='%d' ", string, FactionCars[i][fTuning][8]);
    38. format(query, sizeof(query), "%s`fHydraulics`='%d' ", string, FactionCars[i][fTuning][9]);
    39. format(query, sizeof(query), "%s`fFrontBumper`='%d' ", string, FactionCars[i][fTuning][10]);
    40. format(query, sizeof(query), "%s`fVent1`='%d' ", string, FactionCars[i][fTuning][11]);
    41. format(query, sizeof(query), "%s`fRearBumper`='%d' ", string, FactionCars[i][fTuning][12]);
    42. format(query, sizeof(query), "%s`fVent2`='%d' ", string, FactionCars[i][fTuning][13]);
    43. format(query, sizeof(query), "%s`fPaintjob`='%d' ", string, FactionCars[i][fTuning][14]);
    44. format(query, sizeof(query), "%s`fPrice`='%d' ", string, FactionCars[i][fPrice]);
    45. format(query, sizeof(query), "%s`fTankart`='%d' ", string, FactionCars[i][fTankart]);
    46. format(query, sizeof(query), "%s`fGesperrt`='%d' ", string, FactionCars[i][fGesperrt]);
    47. format(query, sizeof(query), "%s`fMotorschaden`='%d' ", string, FactionCars[i][fMotorschaden]);
    48. format(query, sizeof(query), "%s`fSperrpreis`='%d' ", string, FactionCars[i][fSperrpreis]);
    49. format(query, sizeof(query), "%s WHERE `id` = '%d'", string, i);
    50. //handle = die Connection Handle ID die vor mysql_connect steht.
    51. mysql_pquery(handle, query);
    52. }
    53. }
    54. return 1;
    55. }
    Alles anzeigen
  • hier das sagt er jetzt aus

    Quellcode

    1. [23:48:28 03/07/17] [DEBUG] mysql_connect - host: "localhost", user: "samp6231", database: "samp6231_samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2
    2. [23:48:28 03/07/17] [DEBUG] CMySQLHandle::Create - creating new connection..
    3. [23:48:28 03/07/17] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    4. [23:48:28 03/07/17] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
    5. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    6. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    7. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    8. [23:48:28 03/07/17] [DEBUG] mysql_errno - connection: 1
    9. [23:48:28 03/07/17] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM FracVehicles ORDER BY ID ASC", callback: "LoadFracVehicles_Data", format: "(null)"
    10. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    11. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    12. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    13. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    14. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    15. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    16. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    17. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - connection was successful
    18. [23:48:28 03/07/17] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    19. [23:48:28 03/07/17] [DEBUG] CMySQLQuery::Execute[LoadFracVehicles_Data] - starting query execution
    20. [23:48:28 03/07/17] [DEBUG] CMySQLQuery::Execute[LoadFracVehicles_Data] - query was successfully executed within 0.61 milliseconds
    21. [23:48:28 03/07/17] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    22. [23:48:28 03/07/17] [DEBUG] Calling callback "LoadFracVehicles_Data"..
    23. [23:48:28 03/07/17] [DEBUG] cache_get_row_count - connection: 1
    24. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
    25. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "1"
    26. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fCarid", connection: 1
    27. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fCarid", data: "0"
    28. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fVehid", connection: 1
    29. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fVehid", data: "560"
    30. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosX", connection: 1
    31. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosX", data: "1553.79"
    32. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosY", connection: 1
    33. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosY", data: "-1739.51"
    34. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosZ", connection: 1
    35. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosZ", data: "13.5469"
    36. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 0, field_name: "fPosA", connection: 1
    37. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPosA", data: "73.2695"
    38. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fCol1", connection: 1
    39. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fCol1", data: "-1"
    40. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fCol2", connection: 1
    41. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fCol2", data: "-1"
    42. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction1", connection: 1
    43. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction1", data: "1"
    44. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction2", connection: 1
    45. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction2", data: "0"
    46. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction3", connection: 1
    47. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction3", data: "0"
    48. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction4", connection: 1
    49. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction4", data: "0"
    50. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFaction5", connection: 1
    51. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFaction5", data: "0"
    52. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fSpoiler", connection: 1
    53. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fSpoiler", data: "0"
    54. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fHood", connection: 1
    55. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fHood", data: "0"
    56. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fRoof", connection: 1
    57. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fRoof", data: "0"
    58. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fSideskirt", connection: 1
    59. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fSideskirt", data: "0"
    60. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fLamps", connection: 1
    61. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fLamps", data: "0"
    62. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fNitro", connection: 1
    63. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fNitro", data: "0"
    64. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fExhaust", connection: 1
    65. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fExhaust", data: "0"
    66. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fWheel", connection: 1
    67. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fWheel", data: "0"
    68. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fStereo", connection: 1
    69. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fStereo", data: "0"
    70. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fHydraulics", connection: 1
    71. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fHydraulics", data: "0"
    72. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fFrontBumper", connection: 1
    73. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fFrontBumper", data: "0"
    74. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fVent1", connection: 1
    75. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fVent1", data: "0"
    76. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fRearBumper", connection: 1
    77. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fRearBumper", data: "0"
    78. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fVent2", connection: 1
    79. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fVent2", data: "0"
    80. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fPaintjob", connection: 1
    81. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPaintjob", data: "0"
    82. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fPrice", connection: 1
    83. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fPrice", data: "300000"
    84. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fTankart", connection: 1
    85. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fTankart", data: "1"
    86. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fGesperrt", connection: 1
    87. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fGesperrt", data: "0"
    88. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fMotorschaden", connection: 1
    89. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fMotorschaden", data: "0"
    90. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fSperrpreis", connection: 1
    91. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fSperrpreis", data: "0"
    92. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "ID", connection: 1
    93. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "ID", data: "2"
    94. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fCarid", connection: 1
    95. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fCarid", data: "0"
    96. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fVehid", connection: 1
    97. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fVehid", data: "560"
    98. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 1, field_name: "fPosX", connection: 1
    99. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fPosX", data: "1525.19"
    100. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 1, field_name: "fPosY", connection: 1
    101. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fPosY", data: "-1736.94"
    102. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 1, field_name: "fPosZ", connection: 1
    103. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fPosZ", data: "13.3828"
    104. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_float - row: 1, field_name: "fPosA", connection: 1
    105. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fPosA", data: "356.051"
    106. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fCol1", connection: 1
    107. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fCol1", data: "-1"
    108. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fCol2", connection: 1
    109. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fCol2", data: "-1"
    110. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fFaction1", connection: 1
    111. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fFaction1", data: "1"
    112. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fFaction2", connection: 1
    113. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fFaction2", data: "0"
    114. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fFaction3", connection: 1
    115. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fFaction3", data: "0"
    116. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fFaction4", connection: 1
    117. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fFaction4", data: "0"
    118. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fFaction5", connection: 1
    119. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fFaction5", data: "0"
    120. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fSpoiler", connection: 1
    121. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fSpoiler", data: "0"
    122. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fHood", connection: 1
    123. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fHood", data: "0"
    124. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fRoof", connection: 1
    125. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fRoof", data: "0"
    126. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fSideskirt", connection: 1
    127. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fSideskirt", data: "0"
    128. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fLamps", connection: 1
    129. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fLamps", data: "0"
    130. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fNitro", connection: 1
    131. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fNitro", data: "0"
    132. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fExhaust", connection: 1
    133. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fExhaust", data: "0"
    134. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fWheel", connection: 1
    135. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fWheel", data: "0"
    136. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fStereo", connection: 1
    137. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fStereo", data: "0"
    138. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fHydraulics", connection: 1
    139. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fHydraulics", data: "0"
    140. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fFrontBumper", connection: 1
    141. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fFrontBumper", data: "0"
    142. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fVent1", connection: 1
    143. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fVent1", data: "0"
    144. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fRearBumper", connection: 1
    145. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fRearBumper", data: "0"
    146. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fVent2", connection: 1
    147. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fVent2", data: "0"
    148. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fPaintjob", connection: 1
    149. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fPaintjob", data: "0"
    150. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fPrice", connection: 1
    151. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fPrice", data: "300000"
    152. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fTankart", connection: 1
    153. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fTankart", data: "2"
    154. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fGesperrt", connection: 1
    155. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fGesperrt", data: "0"
    156. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fMotorschaden", connection: 1
    157. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fMotorschaden", data: "0"
    158. [23:48:28 03/07/17] [DEBUG] cache_get_field_content_int - row: 1, field_name: "fSperrpreis", connection: 1
    159. [23:48:28 03/07/17] [DEBUG] CMySQLResult::GetRowDataByName - row: '1', field: "fSperrpreis", data: "0"
    160. [23:48:28 03/07/17] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    Alles anzeigen
  • robbi2304 schrieb:

    Wann soll das Fahrzeug gespeichert werden ? Vielleicht gibst du mir dafür den Code mal. Derzeit kriegst du keine Errors wodurch das eigentlich klappen sollte

    Bitte sehr dann bist du genau da wo ich auch bin finde auch nichts

    PAWN-Quellcode: SaveFracVehCheck

    1. Function OnPlayerExitVehicle(playerid, vehicleid)
    2. {
    3. SaveFracVehCheck(vehicleid);
    4. return 1;
    5. }
    6. stock SaveFracVehCheck(vehicleid)
    7. {
    8. //Deklaration neuer temporärer Variablen:
    9. new query[3048],string[3048];
    10. //Schleife durch alle Fraktions-Fahrzeuge
    11. for(new i=0; i<MAX_FRAC_VEHICLES; i++)
    12. {
    13. //Wenn die vehicleid die gleiche ist, wie die des Fraktions-Fahrzeugs
    14. if(FactionCars[i][fCarid] == vehicleid)
    15. {
    16. //Wir fragen die Position des Fahrzeugs ab:
    17. GetVehiclePos(FactionCars[i][fCarid], FactionCars[i][fPos][0], FactionCars[i][fPos][1], FactionCars[i][fPos][2]);
    18. GetVehicleZAngle(FactionCars[i][fCarid], FactionCars[i][fPos][3]);
    19. //Und wir erstellen das Query:
    20. format(query, sizeof(query), "UPDATE FracVehicles SET");
    21. format(query, sizeof(query), "%s`fVehid`='%s', ", string, FactionCars[i][fVehid]);
    22. format(query, sizeof(query), "%s`fPosX`='%f', ", string, FactionCars[i][fPos][0]);
    23. format(query, sizeof(query), "%s`fPosY`='%f', ", string, FactionCars[i][fPos][1]);
    24. format(query, sizeof(query), "%s`fPosZ`='%f', ", string, FactionCars[i][fPos][2]);
    25. format(query, sizeof(query), "%s`fPosA`='%f', ", string, FactionCars[i][fPos][3]);
    26. format(query, sizeof(query), "%s`fCol1`='%d' ", string, FactionCars[i][fCol][0]);
    27. format(query, sizeof(query), "%s`fCol2`='%d' ", string, FactionCars[i][fCol][1]);
    28. format(query, sizeof(query), "%s`fFaction1`='%d' ", string, FactionCars[i][fFaction][0]);
    29. format(query, sizeof(query), "%s`fFaction2`='%d' ", string, FactionCars[i][fFaction][1]);
    30. format(query, sizeof(query), "%s`fFaction3`='%d' ", string, FactionCars[i][fFaction][2]);
    31. format(query, sizeof(query), "%s`fFaction4`='%d' ", string, FactionCars[i][fFaction][3]);
    32. format(query, sizeof(query), "%s`fFaction5`='%d' ", string, FactionCars[i][fFaction][4]);
    33. format(query, sizeof(query), "%s`fSpoiler`='%d' ", string, FactionCars[i][fTuning][0]);
    34. format(query, sizeof(query), "%s`fHood`='%d' ", string, FactionCars[i][fTuning][1]);
    35. format(query, sizeof(query), "%s`fRoof`='%d' ", string, FactionCars[i][fTuning][2]);
    36. format(query, sizeof(query), "%s`fSideskirt`='%d' ", string, FactionCars[i][fTuning][3]);
    37. format(query, sizeof(query), "%s`fLamps`='%d' ", string, FactionCars[i][fTuning][4]);
    38. format(query, sizeof(query), "%s`fNitro`='%d' ", string, FactionCars[i][fTuning][5]);
    39. format(query, sizeof(query), "%s`fExhaust`='%d' ", string, FactionCars[i][fTuning][6]);
    40. format(query, sizeof(query), "%s`fWheel`='%d' ", string, FactionCars[i][fTuning][7]);
    41. format(query, sizeof(query), "%s`fStereo`='%d' ", string, FactionCars[i][fTuning][8]);
    42. format(query, sizeof(query), "%s`fHydraulics`='%d' ", string, FactionCars[i][fTuning][9]);
    43. format(query, sizeof(query), "%s`fFrontBumper`='%d' ", string, FactionCars[i][fTuning][10]);
    44. format(query, sizeof(query), "%s`fVent1`='%d' ", string, FactionCars[i][fTuning][11]);
    45. format(query, sizeof(query), "%s`fRearBumper`='%d' ", string, FactionCars[i][fTuning][12]);
    46. format(query, sizeof(query), "%s`fVent2`='%d' ", string, FactionCars[i][fTuning][13]);
    47. format(query, sizeof(query), "%s`fPaintjob`='%d' ", string, FactionCars[i][fTuning][14]);
    48. format(query, sizeof(query), "%s`fPrice`='%d' ", string, FactionCars[i][fPrice]);
    49. format(query, sizeof(query), "%s`fTankart`='%d' ", string, FactionCars[i][fTankart]);
    50. format(query, sizeof(query), "%s`fGesperrt`='%d' ", string, FactionCars[i][fGesperrt]);
    51. format(query, sizeof(query), "%s`fMotorschaden`='%d' ", string, FactionCars[i][fMotorschaden]);
    52. format(query, sizeof(query), "%s`fSperrpreis`='%d' ", string, FactionCars[i][fSperrpreis]);
    53. format(query, sizeof(query), "%s WHERE id = '%d'", string, i);
    54. //handle = die Connection Handle ID die vor mysql_connect steht.
    55. mysql_pquery(handle, query);
    56. return 1; //Es gibt ja keine zwei gleichen Fahrzeuge
    57. }
    58. }
    59. return 0; //Fahrzeug ist kein Fraktions-Fahrzeug
    60. }
    Alles anzeigen

    _________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PAWN-Quellcode

    1. public OnGameModeInit()
    2. {
    3. SetTimer("SaveAllFracVehs", 60000, true); //Timer wird alle 60 Sekunden ausgeführt
    4. return 1;
    5. }
    6. Function OnGameModeExit()
    7. {
    8. SaveAllFracVehs();
    9. return 1;
    10. }
    11. forward SaveAllFracVehs();
    12. public SaveAllFracVehs()
    13. {
    14. //Deklaration neuer temporärer Variablen:
    15. new query[3048],string[250];
    16. //Schleife durch alle Fraktions-Fahrzeuge
    17. for(new i=0; i<MAX_FRAC_VEHICLES; i++)
    18. {
    19. //Wenn das Fahrzeug existiert
    20. if(FactionCars[i][fVehid] >= 400 && FactionCars[i][fVehid] <= 611)
    21. {
    22. //Wir fragen die Position des Fahrzeugs ab:
    23. GetVehiclePos(FactionCars[i][fCarid], FactionCars[i][fPos][0], FactionCars[i][fPos][1], FactionCars[i][fPos][2]);
    24. GetVehicleZAngle(FactionCars[i][fCarid], FactionCars[i][fPos][3]);
    25. //Und wir erstellen das Query:
    26. format(query, sizeof(query), "UPDATE `FracVehicles` SET ");
    27. format(query, sizeof(query), "%s`fVehid`='%s', ", string, FactionCars[i][fVehid]);
    28. format(query, sizeof(query), "%s`fPosX`='%f', ", string, FactionCars[i][fPos][0]);
    29. format(query, sizeof(query), "%s`fPosY`='%f', ", string, FactionCars[i][fPos][1]);
    30. format(query, sizeof(query), "%s`fPosZ`='%f', ", string, FactionCars[i][fPos][2]);
    31. format(query, sizeof(query), "%s`fPosA`='%f', ", string, FactionCars[i][fPos][3]);
    32. format(query, sizeof(query), "%s`fCol1`='%d' ", string, FactionCars[i][fCol][0]);
    33. format(query, sizeof(query), "%s`fCol2`='%d' ", string, FactionCars[i][fCol][1]);
    34. format(query, sizeof(query), "%s`fFaction1`='%d' ", string, FactionCars[i][fFaction][0]);
    35. format(query, sizeof(query), "%s`fFaction2`='%d' ", string, FactionCars[i][fFaction][1]);
    36. format(query, sizeof(query), "%s`fFaction3`='%d' ", string, FactionCars[i][fFaction][2]);
    37. format(query, sizeof(query), "%s`fFaction4`='%d' ", string, FactionCars[i][fFaction][3]);
    38. format(query, sizeof(query), "%s`fFaction5`='%d' ", string, FactionCars[i][fFaction][4]);
    39. format(query, sizeof(query), "%s`fSpoiler`='%d' ", string, FactionCars[i][fTuning][0]);
    40. format(query, sizeof(query), "%s`fHood`='%d' ", string, FactionCars[i][fTuning][1]);
    41. format(query, sizeof(query), "%s`fRoof`='%d' ", string, FactionCars[i][fTuning][2]);
    42. format(query, sizeof(query), "%s`fSideskirt`='%d' ", string, FactionCars[i][fTuning][3]);
    43. format(query, sizeof(query), "%s`fLamps`='%d' ", string, FactionCars[i][fTuning][4]);
    44. format(query, sizeof(query), "%s`fNitro`='%d' ", string, FactionCars[i][fTuning][5]);
    45. format(query, sizeof(query), "%s`fExhaust`='%d' ", string, FactionCars[i][fTuning][6]);
    46. format(query, sizeof(query), "%s`fWheel`='%d' ", string, FactionCars[i][fTuning][7]);
    47. format(query, sizeof(query), "%s`fStereo`='%d' ", string, FactionCars[i][fTuning][8]);
    48. format(query, sizeof(query), "%s`fHydraulics`='%d' ", string, FactionCars[i][fTuning][9]);
    49. format(query, sizeof(query), "%s`fFrontBumper`='%d' ", string, FactionCars[i][fTuning][10]);
    50. format(query, sizeof(query), "%s`fVent1`='%d' ", string, FactionCars[i][fTuning][11]);
    51. format(query, sizeof(query), "%s`fRearBumper`='%d' ", string, FactionCars[i][fTuning][12]);
    52. format(query, sizeof(query), "%s`fVent2`='%d' ", string, FactionCars[i][fTuning][13]);
    53. format(query, sizeof(query), "%s`fPaintjob`='%d' ", string, FactionCars[i][fTuning][14]);
    54. format(query, sizeof(query), "%s`fPrice`='%d' ", string, FactionCars[i][fPrice]);
    55. format(query, sizeof(query), "%s`fTankart`='%d' ", string, FactionCars[i][fTankart]);
    56. format(query, sizeof(query), "%s`fGesperrt`='%d' ", string, FactionCars[i][fGesperrt]);
    57. format(query, sizeof(query), "%s`fMotorschaden`='%d' ", string, FactionCars[i][fMotorschaden]);
    58. format(query, sizeof(query), "%s`fSperrpreis`='%d' ", string, FactionCars[i][fSperrpreis]);
    59. format(query, sizeof(query), "%s WHERE id = '%d'", string, i);
    60. //handle = die Connection Handle ID die vor mysql_connect steht.
    61. mysql_pquery(handle, query);
    62. }
    63. }
    64. return 1;
    65. }
    Alles anzeigen
  • robbi2304 schrieb:

    PAWN-Quellcode

    1. format(query, sizeof(query), "%s WHERE `id` = '%d'", string, i);
    in beiden Teilen

    zu

    PAWN-Quellcode

    1. format(query, sizeof(query), "%s WHERE id = '%d'", string, i);

    Kannst Du mal bitte erlaeutern, wieso das ein Fehler gewesen ist?
    city-of-sa.de - Roleplay Projekt - Release: 2018
    samp-models.net - SA:MP Model Hoster

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Slider () aus folgendem Grund: Typo