Script bleibt einfach "stehen"...

  • new query[2000]; <-- Ab hier new valuesquery1[2000]; new valuesquery2[2000]; new valuesquery3[2000]; new valuesquery4[2000];


    nachdem new query[2000]; im Script kommt bleibt die Funktion stehen...


    Danke im Vorraus.


    //Edit: Falscher bereich Bitte verschieben in den Scripting Bereich von SAMP

  • Habe das Script jetzt auf 1 String umgeschrieben. geht immernoch nicht nach new Query Hängt das Script wieder



    printf("1");
    new query[5000];
    printf("create Query");
    format(query, sizeof(query), "%s%s%s%s%s%s%s%s%s%s%s%s",
    "INSERT INTO Clients (name, pKey, pLevel, pAdmin, pDonateRank, gPupgrade, pConnectTime, pReg, pSex,",
    "pAge, pOrigin, pCK, pMuted, pExp, pCash, pAccount, pCrimes, pKills, pDeaths, pArrested, pWantedDeaths,",
    "pPhoneBook, pLottoNr, pFishes, pJob, PPayCheck, pHeadValue, pJailed, pJailTime, pMats, pDrugs, pLeader,",
    "pMember, pFMember, pRank, pChar, pContractTime, pDetSkill, pSexSkill, pBoxSkill, pLawSkill, pMechSkill,",
    "pJackSkill, pCarSkill, pNewsSkill, pDrugsSkill, pCookSkill, pFishSkill, pHealth, pSHealth, pInt,",
    "pLocal, pTeam, pModel, pPnumber, pPhousekey, pPbiskey, pPos_x, pPos_y, pPos_z, pCarLic, pNewLic,",
    "pFlyLic, pBoatLic, pFishLic, pGunLic, pLKWLic, pMotoLic, pZig, pZigSucht, pGun1, pGun2, pGun3, pGun4,",
    "pAmmo1, pAmmo2, pAmmo3, pAmmo4, pCarTime, pPayDay, pPayDayHad, pCDPlayer, pWins, pLoses, pAlcoholPerk,",
    "pDrugPerk, pMiserPerk, pPainPerk, pTraderPerk, pTut, pWarns, pAdjustable, pFuel, pMarried, pMarriedTo,",
    "pRoadblock, pPlayMinutes, pGesamtMinutes, pMinutesSinceLogin, pMinutesSinceAn, pSFPASS, pLVPASS,",
    "pHandyGeld, pHandyVer, pUhrID, pHandyID, pTot, pTx, pTy, pTz, pOwnPerso, pOwnAntrag, pPersoStop,pFrakSperre, pWantedLevel, pWantedPoints, pKnastTime, pKnast, pOfflineFlucht, pSpawnChange) ");



    printf(query);

    format(query, sizeof(query), "%sVALUES ('%s','%s',%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,",
    query,
    playername3,
    PlayerInfo[playerid][pKey],
    PlayerInfo[playerid][pLevel],
    PlayerInfo[playerid][pAdmin],
    PlayerInfo[playerid][pDonateRank],
    PlayerInfo[playerid][gPupgrade],
    PlayerInfo[playerid][pConnectTime],
    PlayerInfo[playerid][pReg],
    PlayerInfo[playerid][pSex],
    PlayerInfo[playerid][pAge],
    PlayerInfo[playerid][pOrigin],
    PlayerInfo[playerid][pCK],
    PlayerInfo[playerid][pMuted],
    PlayerInfo[playerid][pExp],
    PlayerInfo[playerid][pCash],
    PlayerInfo[playerid][pAccount],
    PlayerInfo[playerid][pCrimes],
    PlayerInfo[playerid][pKills],
    PlayerInfo[playerid][pDeaths],
    PlayerInfo[playerid][pArrested],
    PlayerInfo[playerid][pWantedDeaths],
    PlayerInfo[playerid][pPhoneBook],
    PlayerInfo[playerid][pLottoNr],
    PlayerInfo[playerid][pFishes],
    PlayerInfo[playerid][pJob],
    PlayerInfo[playerid][pPayCheck],
    PlayerInfo[playerid][pHeadValue],
    PlayerInfo[playerid][pJailed],
    PlayerInfo[playerid][pJailTime],
    PlayerInfo[playerid][pMats],
    PlayerInfo[playerid][pDrugs]);
    printf(query);
    format(query, sizeof(query), "%s%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%f,%f,%i,%i,%i,%i,%i,%i,%i,%f,%f,%f,%i,%i,%i,%i,%i,%i,",
    query,
    PlayerInfo[playerid][pLeader],
    PlayerInfo[playerid][pMember],
    PlayerInfo[playerid][pFMember],
    PlayerInfo[playerid][pRank],
    PlayerInfo[playerid][pChar],
    PlayerInfo[playerid][pContractTime],
    PlayerInfo[playerid][pDetSkill],
    PlayerInfo[playerid][pSexSkill],
    PlayerInfo[playerid][pBoxSkill],
    PlayerInfo[playerid][pLawSkill],
    PlayerInfo[playerid][pMechSkill],
    PlayerInfo[playerid][pJackSkill],
    PlayerInfo[playerid][pCarSkill],
    PlayerInfo[playerid][pNewsSkill],
    PlayerInfo[playerid][pDrugsSkill],
    PlayerInfo[playerid][pCookSkill],
    PlayerInfo[playerid][pFishSkill],
    PlayerInfo[playerid][pHealth],
    PlayerInfo[playerid][pSHealth],
    PlayerInfo[playerid][pInt],
    PlayerInfo[playerid][pLocal],
    PlayerInfo[playerid][pTeam],
    PlayerInfo[playerid][pModel],
    PlayerInfo[playerid][pPnumber],
    PlayerInfo[playerid][pPhousekey],
    PlayerInfo[playerid][pPbiskey],
    PlayerInfo[playerid][pPos_x],
    PlayerInfo[playerid][pPos_y],
    PlayerInfo[playerid][pPos_z],
    PlayerInfo[playerid][pCarLic],
    PlayerInfo[playerid][pNewLic],
    PlayerInfo[playerid][pFlyLic],
    PlayerInfo[playerid][pBoatLic],
    PlayerInfo[playerid][pFishLic],
    PlayerInfo[playerid][pGunLic]);
    printf(query);
    format(query, sizeof(query), "%s%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,'%s',%i,%i,%i,%i,%i,",
    query,
    PlayerInfo[playerid][pLKWLic],
    PlayerInfo[playerid][pMotoLic],
    PlayerInfo[playerid][pZig],
    PlayerInfo[playerid][pZigSucht],
    PlayerInfo[playerid][pGun1],
    PlayerInfo[playerid][pGun2],
    PlayerInfo[playerid][pGun3],
    PlayerInfo[playerid][pGun4],
    PlayerInfo[playerid][pAmmo1],
    PlayerInfo[playerid][pAmmo2],
    PlayerInfo[playerid][pAmmo3],
    PlayerInfo[playerid][pAmmo4],
    PlayerInfo[playerid][pCarTime],
    PlayerInfo[playerid][pPayDay],
    PlayerInfo[playerid][pPayDayHad],
    PlayerInfo[playerid][pCDPlayer],
    PlayerInfo[playerid][pWins],
    PlayerInfo[playerid][pLoses],
    PlayerInfo[playerid][pAlcoholPerk],
    PlayerInfo[playerid][pDrugPerk],
    PlayerInfo[playerid][pMiserPerk],
    PlayerInfo[playerid][pPainPerk],
    PlayerInfo[playerid][pTraderPerk],
    PlayerInfo[playerid][pTut],
    PlayerInfo[playerid][pWarns],
    PlayerInfo[playerid][pAdjustable],
    PlayerInfo[playerid][pFuel],
    PlayerInfo[playerid][pMarried],
    PlayerInfo[playerid][pMarriedTo],
    PlayerInfo[playerid][pRoadblock],
    PlayerInfo[playerid][pPlayMinutes],
    PlayerInfo[playerid][pGesamtMinutes],
    PlayerInfo[playerid][pMinutesSinceLogin],
    PlayerInfo[playerid][pMinutesSinceAn]);
    printf(query);
    format(query, sizeof(query), "%s%i,%i,%i,%i,%i,%i,%i,%f,%f,%f,%i,%i,%i,%i, %i, %i, %i, %i, %i, %i)",
    query,
    PlayerInfo[playerid][pSFPASS],
    PlayerInfo[playerid][pLVPASS],
    PlayerInfo[playerid][pHandyGeld],
    PlayerInfo[playerid][pHandyVer],
    PlayerInfo[playerid][pUhrID],
    PlayerInfo[playerid][pHandyID],
    PlayerInfo[playerid][pTot],
    PlayerInfo[playerid][pTx],
    PlayerInfo[playerid][pTy],
    PlayerInfo[playerid][pTz],
    PlayerInfo[playerid][pOwnPerso],
    PlayerInfo[playerid][pOwnAntrag],
    PlayerInfo[playerid][pPersoStop],
    PlayerInfo[playerid][pFrakSperre],
    WantedLevel[playerid],
    WantedPoints[playerid],
    KnastTime[playerid],
    Knast[playerid],
    OfflineFlucht[playerid],
    SpawnChange[playerid]);



    printf(query);
    mysql_tquery(SQLHandel, query);

  • Was zum Teufel


    Zum erstellen eines Accounts reicht schon:

    Code
    format(query, sizeof(query),"INSERT INTO accounts (playername,password,email) VALUES ('%s','%s','%s')", PlayerName(playerid), password, email);
    mysql_query(mysql_handle, query, true);


    deine Query ist außerdem 5000 Zeichen groß, die maximale Stringlänge beträgt 2048. Ein wunder das du nicht mit errors zu bombadiert wirst!

    saphire.one

    Founder