Problem mit Autohaus

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hey und zwar habe ich ein Fraktionsautohaus in mein Script eingefügt aber bekomme die ganze Zeit Errors ich hoffe ihr könnt mir helfen.


    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\projekt.pwn(33355) : error 021: symbol already defined: "printf"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\projekt.pwn(33356) : error 026: no matching "#if..."
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\projekt.pwn(33357) : error 010: invalid function or declaration
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\projekt.pwn(33358) : error 010: invalid function or declaration
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\projekt.pwn(33362) : error 021: symbol already defined: "format"


    printf(" Staatsfraktionsautohaus am laden.");
    LoadStateFactionCars();
    //FactionCarsTimer = SetTimer("LockStateFactionCarDoors",1037,true);
    #endif
    SaveStateFactionCarsTimer = SetTimerEx("SaveStateFactionCars",((1000*60)*15),true,"d",false);
    for(new fbl=0;fbl<sizeof(FactionStateBuylist);fbl++)
    {
    FactionStateBuylist[fbl][sfbCarid] = CreateVehicle(FactionStateBuylist[fbl][sfbVehid],FactionStateBuylist[fbl][sfbX],FactionStateBuylist[fbl][sfbY],FactionStateBuylist[fbl][sfbZ],FactionStateBuylist[fbl][sfbA],-1,-1,-255);
    new fblText[128];
    format(fblText,sizeof(fblText),"{FFFFFF}|- {FF8200}Staatsfraktionsautohaus{FFFFFF} -|\n{FF8200}Modell:{FFFFFF} %s\n{FF8200}Preis:{FFFFFF} $%i",fCarName[FactionStateBuylist[fbl][sfbVehid]-400],FactionStateBuylist[fbl][sfbPrice]);
    FactionStateBuylist[fbl][sfbLabel] = Create3DTextLabel(fblText,0xFFFFFFFF,FactionStateBuylist[fbl][sfbX],FactionStateBuylist[fbl][sfbY],FactionStateBuylist[fbl][sfbZ],15.0,0,true);
    Attach3DTextLabelToVehicle(FactionStateBuylist[fbl][sfbLabel],FactionStateBuylist[fbl][sfbCarid],0.0,0.0,0.75);
    }
    BuylistStateRespawner = SetTimer("RespawnStateFactionBuylist",(1000*60),true);
    SetTimer("RespawnStateFactionBuylist",20000,false);
    printf(" Staatsfraktionsautohaus geladen.");
    printf("--------------------------------------\n");

  • @Jeffry ich habe jetzt bissl. dran gearbeitet und nun die vorherigen Errors die da waren weggekriegt, doch bekomme sowas wie:
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(2907) : error 029: invalid expression, assumed zero
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(2907) : error 004: function "DestroyAndCreateFactionCar" is not implemented
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(2908) : error 017: undefined symbol "fc"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(2908) : error 029: invalid expression, assumed zero
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(2908) : error 001: expected token: ";", but found "]"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(2908) : fatal error 107: too many error messages on one line


    public OnGameModeInit()
    {
    SetGameModeText("German Reallife City");
    //dbhandle=mysql_connect(SQL_HOST, SQL_USR, SQL_DB, SQL_PWD);
    DisableInteriorEnterExits();
    ManualVehicleEngineAndLights();
    UsePlayerPedAnims();
    Load_Garages();
    Load_Haeuser();
    Fight_Init();
    ResetElevatorQueue();
    EnableStuntBonusForAll(false);
    Elevator_Initialize();
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    public DestroyAndCreateFactionCar(fc){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    DestroyVehicle(FactionCars[fc][fCarid]);
    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],-255);
    ReloadGangCarList(FactionCars[fc][fFaction][0]);
    #if defined FACTION_CARS_TUNEABLE
    if(IsAllowedFactionToTune(FactionCars[fc][fFaction][0])){
    if(FactionCars[fc][fTuning][0] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][0]); }
    if(FactionCars[fc][fTuning][1] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][1]); }
    if(FactionCars[fc][fTuning][2] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][2]); }
    if(FactionCars[fc][fTuning][3] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][3]); }
    if(FactionCars[fc][fTuning][4] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][4]); }
    if(FactionCars[fc][fTuning][5] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][5]); }
    if(FactionCars[fc][fTuning][6] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][6]); }
    if(FactionCars[fc][fTuning][7] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][7]); }
    if(FactionCars[fc][fTuning][8] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][8]); }
    if(FactionCars[fc][fTuning][9] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][9]); }
    if(FactionCars[fc][fTuning][10] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][10]); }
    if(FactionCars[fc][fTuning][11] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][11]); }
    if(FactionCars[fc][fTuning][12] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][12]); }
    if(FactionCars[fc][fTuning][13] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][13]); }
    }
    #endif
    }return true;
    }


    public DestroyAndCreateStateFactionCar(fc){
    if(StateFactionCars[fc][sfVehid] >= 400 && StateFactionCars[fc][sfVehid] <= 611){
    DestroyVehicle(StateFactionCars[fc][sfCarid]);
    StateFactionCars[fc][sfCarid] = CreateVehicle(StateFactionCars[fc][sfVehid],StateFactionCars[fc][sfPos][0],StateFactionCars[fc][sfPos][1],StateFactionCars[fc][sfPos][2],StateFactionCars[fc][sfPos][3],StateFactionCars[fc][sfCol][0],StateFactionCars[fc][sfCol][1],-255);
    #if defined STATEFACTION_CARS_TUNEABLE
    if(IsAllowedFactionToTune(StateFactionCars[fc][sfFaction][0])){
    if(StateFactionCars[fc][sfTuning][0] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][0]); }
    if(StateFactionCars[fc][sfTuning][1] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][1]); }
    if(StateFactionCars[fc][sfTuning][2] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][2]); }
    if(StateFactionCars[fc][sfTuning][3] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][3]); }
    if(StateFactionCars[fc][sfTuning][4] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][4]); }
    if(StateFactionCars[fc][sfTuning][5] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][5]); }
    if(StateFactionCars[fc][sfTuning][6] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][6]); }
    if(StateFactionCars[fc][sfTuning][7] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][7]); }
    if(StateFactionCars[fc][sfTuning][8] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][8]); }
    if(StateFactionCars[fc][sfTuning][9] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][9]); }
    if(StateFactionCars[fc][sfTuning][10] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][10]); }
    if(StateFactionCars[fc][sfTuning][11] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][11]); }
    if(StateFactionCars[fc][sfTuning][12] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][12]); }
    if(StateFactionCars[fc][sfTuning][13] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][13]); }
    }
    #endif
    }return true;
    }


    public LoadFactionCars(){
    if(!fexist(FACTION_CAR_FILE))
    {
    new File:tfFile=fopen(FACTION_CAR_FILE,io_write);
    fclose(tfFile);
    }
    new File:fFile=fopen(FACTION_CAR_FILE,io_read),Content[1024],fc;
    while(fread(fFile,Content) && fc<sizeof(FactionCars))
    {
    StripNewLine(Content);
    sscanf(Content,"dffffdddddddddddddddddddddddd",
    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],
    FactionCars[fc][fFaction][1],
    FactionCars[fc][fFaction][2],
    FactionCars[fc][fFaction][3],
    FactionCars[fc][fFaction][4],
    FactionCars[fc][fTuning][0],
    FactionCars[fc][fTuning][1],
    FactionCars[fc][fTuning][2],
    FactionCars[fc][fTuning][3],
    FactionCars[fc][fTuning][4],
    FactionCars[fc][fTuning][5],
    FactionCars[fc][fTuning][6],
    FactionCars[fc][fTuning][7],
    FactionCars[fc][fTuning][8],
    FactionCars[fc][fTuning][9],
    FactionCars[fc][fTuning][10],
    FactionCars[fc][fTuning][11],
    FactionCars[fc][fTuning][12],
    FactionCars[fc][fTuning][13],
    FactionCars[fc][fPrice],
    FactionCars[fc][fAbgeschleppt],
    FactionCars[fc][fAbgeschlepptPreis]);
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    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],-255);
    #if defined FACTION_CARS_TUNEABLE
    if(IsAllowedFactionToTune(FactionCars[fc][fFaction][0])){
    if(FactionCars[fc][fTuning][0] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][0]); }
    if(FactionCars[fc][fTuning][1] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][1]); }
    if(FactionCars[fc][fTuning][2] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][2]); }
    if(FactionCars[fc][fTuning][3] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][3]); }
    if(FactionCars[fc][fTuning][4] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][4]); }
    if(FactionCars[fc][fTuning][5] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][5]); }
    if(FactionCars[fc][fTuning][6] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][6]); }
    if(FactionCars[fc][fTuning][7] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][7]); }
    if(FactionCars[fc][fTuning][8] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][8]); }
    if(FactionCars[fc][fTuning][9] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][9]); }
    if(FactionCars[fc][fTuning][10] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][10]); }
    if(FactionCars[fc][fTuning][11] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][11]); }
    if(FactionCars[fc][fTuning][12] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][12]); }
    if(FactionCars[fc][fTuning][13] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][13]); }
    }
    #endif
    fc++;
    }
    }fclose(fFile);
    return printf(" '%d' Fraktionsfahrzeuge wurden geladen & erstellt.",fc);
    }
    public SaveFactionCars(bool:destroy){
    if(fexist(FACTION_CAR_FILE)) fremove(FACTION_CAR_FILE);
    new File:fFile=fopen(FACTION_CAR_FILE,io_append),Content[1024];
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\r\n",
    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],
    FactionCars[fc][fFaction][1],
    FactionCars[fc][fFaction][2],
    FactionCars[fc][fFaction][3],
    FactionCars[fc][fFaction][4],
    FactionCars[fc][fTuning][0],
    FactionCars[fc][fTuning][1],
    FactionCars[fc][fTuning][2],
    FactionCars[fc][fTuning][3],
    FactionCars[fc][fTuning][4],
    FactionCars[fc][fTuning][5],
    FactionCars[fc][fTuning][6],
    FactionCars[fc][fTuning][7],
    FactionCars[fc][fTuning][8],
    FactionCars[fc][fTuning][9],
    FactionCars[fc][fTuning][10],
    FactionCars[fc][fTuning][11],
    FactionCars[fc][fTuning][12],
    FactionCars[fc][fTuning][13],
    FactionCars[fc][fPrice],
    FactionCars[fc][fAbgeschleppt],
    FactionCars[fc][fAbgeschlepptPreis]);
    fwrite(fFile,Content);
    if(destroy == true){
    if(DestroyVehicle(FactionCars[fc][fCarid]))
    FactionCars[fc][fCarid] = -255;
    }
    }
    }fclose(fFile);
    return true;
    }


    public LoadStateFactionCars()
    {
    if(!fexist(STATEFACTION_CAR_FILE))
    {
    new File:tfFile=fopen(STATEFACTION_CAR_FILE,io_write);
    fclose(tfFile);
    }
    new File:fFile=fopen(STATEFACTION_CAR_FILE,io_read),Content[1024],fc;
    while(fread(fFile,Content) && fc<sizeof(StateFactionCars))
    {
    StripNewLine(Content);
    sscanf(Content,"dffffdddddddddddddddddddddddd",
    StateFactionCars[fc][sfVehid],
    StateFactionCars[fc][sfPos][0],
    StateFactionCars[fc][sfPos][1],
    StateFactionCars[fc][sfPos][2],
    StateFactionCars[fc][sfPos][3],
    StateFactionCars[fc][sfCol][0],
    StateFactionCars[fc][sfCol][1],
    StateFactionCars[fc][sfFaction][0],
    StateFactionCars[fc][sfFaction][1],
    StateFactionCars[fc][sfFaction][2],
    StateFactionCars[fc][sfFaction][3],
    StateFactionCars[fc][sfFaction][4],
    StateFactionCars[fc][sfTuning][0],
    StateFactionCars[fc][sfTuning][1],
    StateFactionCars[fc][sfTuning][2],
    StateFactionCars[fc][sfTuning][3],
    StateFactionCars[fc][sfTuning][4],
    StateFactionCars[fc][sfTuning][5],
    StateFactionCars[fc][sfTuning][6],
    StateFactionCars[fc][sfTuning][7],
    StateFactionCars[fc][sfTuning][8],
    StateFactionCars[fc][sfTuning][9],
    StateFactionCars[fc][sfTuning][10],
    StateFactionCars[fc][sfTuning][11],
    StateFactionCars[fc][sfTuning][12],
    StateFactionCars[fc][sfTuning][13],
    StateFactionCars[fc][sfPrice],
    StateFactionCars[fc][sfAbgeschleppt],
    StateFactionCars[fc][sfAbgeschlepptPreis]);
    if(StateFactionCars[fc][sfVehid] >= 400 && StateFactionCars[fc][sfVehid] <= 611)
    {
    StateFactionCars[fc][sfCarid] = CreateVehicle(StateFactionCars[fc][sfVehid],StateFactionCars[fc][sfPos][0],StateFactionCars[fc][sfPos][1],StateFactionCars[fc][sfPos][2],StateFactionCars[fc][sfPos][3],StateFactionCars[fc][sfCol][0],StateFactionCars[fc][sfCol][1],-255);
    enginevar[StateFactionCars[fc][sfCarid]] = 0;
    #if defined STATEFACTION_CARS_LOCKABLE
    //fLockCar(StateFactionCars[fc][sfCarid]);
    StateFactionCars[fc][sfLock] = true;
    #endif
    #if defined STATEFACTION_CARS_TUNEABLE
    if(IsAllowedFactionToTune(StateFactionCars[fc][sfFaction][0])){
    if(StateFactionCars[fc][sfTuning][0] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][0]); }
    if(StateFactionCars[fc][sfTuning][1] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][1]); }
    if(StateFactionCars[fc][sfTuning][2] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][2]); }
    if(StateFactionCars[fc][sfTuning][3] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][3]); }
    if(StateFactionCars[fc][sfTuning][4] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][4]); }
    if(StateFactionCars[fc][sfTuning][5] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][5]); }
    if(StateFactionCars[fc][sfTuning][6] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][6]); }
    if(StateFactionCars[fc][sfTuning][7] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][7]); }
    if(StateFactionCars[fc][sfTuning][8] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][8]); }
    if(StateFactionCars[fc][sfTuning][9] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][9]); }
    if(StateFactionCars[fc][sfTuning][10] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][10]); }
    if(StateFactionCars[fc][sfTuning][11] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][11]); }
    if(StateFactionCars[fc][sfTuning][12] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][12]); }
    if(StateFactionCars[fc][sfTuning][13] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][13]); }
    }
    #endif
    fc++;
    }
    }fclose(fFile);
    return printf(" '%d' Staatsfraktionsautos wurden geladen & erstellt.",fc);
    }
    public SaveStateFactionCars(bool:destroy){
    if(fexist(STATEFACTION_CAR_FILE)) fremove(STATEFACTION_CAR_FILE);
    new File:fFile=fopen(STATEFACTION_CAR_FILE,io_append),Content[1024];
    for(new fc;fc<sizeof(StateFactionCars);fc++){
    if(StateFactionCars[fc][sfVehid] >= 400 && StateFactionCars[fc][sfVehid] <= 611){
    format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\r\n",
    StateFactionCars[fc][sfVehid],
    StateFactionCars[fc][sfPos][0],
    StateFactionCars[fc][sfPos][1],
    StateFactionCars[fc][sfPos][2],
    StateFactionCars[fc][sfPos][3],
    StateFactionCars[fc][sfCol][0],
    StateFactionCars[fc][sfCol][1],
    StateFactionCars[fc][sfFaction][0],
    StateFactionCars[fc][sfFaction][1],
    StateFactionCars[fc][sfFaction][2],
    StateFactionCars[fc][sfFaction][3],
    StateFactionCars[fc][sfFaction][4],
    StateFactionCars[fc][sfTuning][0],
    StateFactionCars[fc][sfTuning][1],
    StateFactionCars[fc][sfTuning][2],
    StateFactionCars[fc][sfTuning][3],
    StateFactionCars[fc][sfTuning][4],
    StateFactionCars[fc][sfTuning][5],
    StateFactionCars[fc][sfTuning][6],
    StateFactionCars[fc][sfTuning][7],
    StateFactionCars[fc][sfTuning][8],
    StateFactionCars[fc][sfTuning][9],
    StateFactionCars[fc][sfTuning][10],
    StateFactionCars[fc][sfTuning][11],
    StateFactionCars[fc][sfTuning][12],
    StateFactionCars[fc][sfTuning][13],
    StateFactionCars[fc][sfPrice],
    StateFactionCars[fc][sfAbgeschleppt],
    StateFactionCars[fc][sfAbgeschlepptPreis]);
    fwrite(fFile,Content);
    if(destroy == true)
    {
    if(DestroyVehicle(StateFactionCars[fc][sfCarid]))
    StateFactionCars[fc][sfCarid] = -255;
    }
    }
    }fclose(fFile);
    return true;
    }


    public RespawnFactionBuylist(){
    for(new fbl;fbl<sizeof(FactionBuylist);fbl++)
    SetVehicleToRespawn(FactionBuylist[fbl][fbCarid]);
    return 1;
    }
    public RespawnStateFactionBuylist()
    {
    for(new fbl;fbl<sizeof(FactionStateBuylist);fbl++)
    SetVehicleToRespawn(FactionStateBuylist[fbl][sfbCarid]);
    return 1;
    }
    public RemoveComponent(vehicleid,componentid)
    return RemoveVehicleComponent(vehicleid,componentid);
    public ChangePaintjob(vehicleid,paintjobid)
    return ChangeVehiclePaintjob(vehicleid,paintjobid);
    public ChangeColor(vehicleid,color1,color2)
    return ChangeVehicleColor(vehicleid,color1,color2);
    printf(" Staatsfraktionsautohaus am laden.");
    LoadStateFactionCars();
    #if defined STATEFACTION_CARS_LOCKABLE
    //FactionCarsTimer = SetTimer("LockStateFactionCarDoors",1037,true);
    #endif
    SaveStateFactionCarsTimer = SetTimerEx("SaveStateFactionCars",((1000*60)*15),true,"d",false);
    for(new fbl=0;fbl<sizeof(FactionStateBuylist);fbl++)
    {
    FactionStateBuylist[fbl][sfbCarid] = CreateVehicle(FactionStateBuylist[fbl][sfbVehid],FactionStateBuylist[fbl][sfbX],FactionStateBuylist[fbl][sfbY],FactionStateBuylist[fbl][sfbZ],FactionStateBuylist[fbl][sfbA],-1,-1,-255);
    new fblText[128];
    format(fblText,sizeof(fblText),"{FFFFFF}|- {FF8200}Staatsfraktionsautohaus{FFFFFF} -|\n{FF8200}Modell:{FFFFFF} %s\n{FF8200}Preis:{FFFFFF} $%i",fCarName[FactionStateBuylist[fbl][sfbVehid]-400],FactionStateBuylist[fbl][sfbPrice]);
    FactionStateBuylist[fbl][sfbLabel] = Create3DTextLabel(fblText,0xFFFFFFFF,FactionStateBuylist[fbl][sfbX],FactionStateBuylist[fbl][sfbY],FactionStateBuylist[fbl][sfbZ],15.0,0,true);
    Attach3DTextLabelToVehicle(FactionStateBuylist[fbl][sfbLabel],FactionStateBuylist[fbl][sfbCarid],0.0,0.0,0.75);
    }
    BuylistStateRespawner = SetTimer("RespawnStateFactionBuylist",(1000*60),true);
    SetTimer("RespawnStateFactionBuylist",20000,false);
    printf(" Staatsfraktionsautohaus geladen.");
    printf("--------------------------------------\n");

    Einmal editiert, zuletzt von Propheion ()

  • @CaZe ich habe es jetzt ganz unten am letzten Public hinzugefügt, bekomme aber nun diese Errors:
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13613) : warning 219: local variable "fblText" shadows a variable at a preceding level
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13636) : error 017: undefined symbol "gPlayerLogged"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13636) : warning 215: expression has no effect
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13636) : error 001: expected token: ";", but found "]"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13636) : error 029: invalid expression, assumed zero
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13636) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.




    public OnGameModeExit()
    {
    foreach (Character,i)
    {
    gPlayerLogged[i] = 0;
    OnPlayerUpdate_(i);
    }
    for(new v=0; v<MAX_VEHICLES; v++)
    {
    DestroyVehicle(v);
    }


    KillTimer(tanktimer);
    KillTimer(HalfSecTimer);


    KillTimer(SaveFactionCarsTimer);
    KillTimer(SaveStateFactionCarsTimer);
    //KillTimer(FactionCarsTimer);
    SaveFactionCars(true);
    KillTimer(BuylistRespawner);
    SaveStateFactionCars(true);
    KillTimer(BuylistStateRespawner);
    for(new fbl;fbl<sizeof(FactionBuylist);fbl++)
    {
    DestroyVehicle(FactionBuylist[fbl][fbCarid]);
    Delete3DTextLabel(FactionBuylist[fbl][fbLabel]);
    }
    for(new fbl;fbl<sizeof(FactionStateBuylist);fbl++)
    {
    DestroyVehicle(FactionStateBuylist[fbl][sfbCarid]);
    Delete3DTextLabel(FactionStateBuylist[fbl][sfbLabel]);
    }


    SaveContracts();

  • @CaZe danach bekomm ich direkt 26 Errors mit dem Grund undefined playerid
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13615) : warning 219: local variable "fblText" shadows a variable at a preceding level
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13639) : error 017: undefined symbol "OnPlayerUpdate_"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13646) : error 017: undefined symbol "tanktimer"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13647) : error 017: undefined symbol "HalfSecTimer"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13654) : warning 202: number of arguments does not match definition
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13667) : error 017: undefined symbol "SaveContracts"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13671) : warning 217: loose indentation
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13671) : error 029: invalid expression, assumed zero
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13671) : error 004: function "OnPlayerRequestClass" is not implemented
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13673) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13674) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13675) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13676) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13677) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13682) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13684) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13686) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13687) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13688) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13692) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13693) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13695) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13696) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13697) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13698) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13699) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13700) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13701) : error 017: undefined symbol "playerid"
    C:\Users\Kai\Desktop\GTA San Andreas Multiplayer Server 0.3.7\gamemodes\LoG.pwn(13702) : error 017: undefined symbol "playerid"


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    26 Errors.

  • new i;
    for(i=0; i<sizeof(Kaufliste); i++)
    {
    Kaufliste[i][Carid]=CreateVehicle(Kaufliste[i][Modelid],Kaufliste[i][XX],Kaufliste[i][YY],Kaufliste[i][ZZ],Kaufliste[i][Rotation],-1,-1,-1);
    new fblText[128];
    format(fblText,sizeof(fblText),"{FF9D00}%s{FEFEFE} steht zum Verkauf\n{FF9D00}Preis:{FEFEFE} $%d\n{FF9D00}Verkäufer:{FEFEFE} Autohaus",Kaufliste[i][Name],Kaufliste[i][Preis]);
    Kaufliste[i][fbLabel] = Create3DTextLabel(fblText,0xFFFFFFFF,Kaufliste[i][XX],Kaufliste[i][YY],Kaufliste[i][ZZ],40.0,0,0);
    //Attach3DTextLabelToVehicle(Kaufliste[i][fbLabel],Kaufliste[i][Modelid],0.0,0.0,0.75);
    Attach3DTextLabelToVehicle(Kaufliste[i][fbLabel], Kaufliste[i][Carid],0.0,0.0,0.75);
    }
    for(i=0; i<MAX_PLAYERS; i++)
    {
    Spectating[i][0]=-1;
    }
    for(new t=0; t<=MAX_PLAYERS; t++)
    if(bagmoney[t]>0)
    {
    DestroyDynamicObject(bagobjects[t]);
    DestroyDynamic3DTextLabel(bagtext[t]);
    bagmoney[t]=0,bagpos[t][0]=0.0,bagpos[t][1]=0.0,bagpos[t][2]=0.0;
    }
    return 1;
    }
    public OnGameModeExit()
    {
    foreach (Character,i)
    {
    gPlayerLogged[i] = 0;
    OnPlayerUpdate_(i);
    }
    for(new v=0; v<MAX_VEHICLES; v++)
    {
    DestroyVehicle(v);
    }


    KillTimer(tanktimer);
    KillTimer(HalfSecTimer);


    KillTimer(SaveFactionCarsTimer);
    KillTimer(SaveStateFactionCarsTimer);
    //KillTimer(FactionCarsTimer);
    SaveFactionCars(true);
    KillTimer(BuylistRespawner);
    SaveStateFactionCars(true);
    KillTimer(BuylistStateRespawner);
    for(new fbl;fbl<sizeof(FactionBuylist);fbl++)
    {
    DestroyVehicle(FactionBuylist[fbl][fbCarid]);
    Delete3DTextLabel(FactionBuylist[fbl][fbLabel]);
    }
    for(new fbl;fbl<sizeof(FactionStateBuylist);fbl++)
    {
    DestroyVehicle(FactionStateBuylist[fbl][sfbCarid]);
    Delete3DTextLabel(FactionStateBuylist[fbl][sfbLabel]);
    }


    SaveContracts();




    public OnPlayerRequestClass(playerid, classid)
    {
    if(IsPlayerNPC(playerid))return 1;
    SetupLoginBilder(playerid);
    SetSpawnInfo( playerid,7,264,805.4880,-1343.7689,-0.5078,136.8591,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    ClearChatbox(playerid, 10);
    new pName[MAX_PLAYER_NAME];
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    new string[250];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/SpielerAccount/%s.txt",name);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "Hallo und Herzlich Willkommen %s", pName);
    SendClientMessage(playerid,0xC8C8C833, string);
    SendClientMessage(playerid,0xC8C8C833,"Wir freuen uns, dich auf unserem Server gegrüßen zu dürfen");
    SendClientMessage(playerid,0xC8C8C833,"Server erstellt Userdaten (Bitte Warten)");
    if(dini_Exists(Spielerdatei))
    {
    new login[MAX_PLAYER_NAME];
    SetupLoginBilder(playerid);
    GetPlayerName(playerid, login, sizeof(login));


    TextDrawShowForPlayer(playerid, RegBalken1);
    TextDrawShowForPlayer(playerid, RegBalken2);
    TextDrawShowForPlayer(playerid, RegBalken3);
    TextDrawShowForPlayer(playerid, RegBalken4);

  • Probiere es bitte so: Ersetze die jetzigen gleichnamigen Publics mit denen die ich hier unten im Quellcode angehangen habe.

  • Probiere es bitte so: Es ist möglich, dass ein oder mehrere Zeilen zu lang für den Compiler waren.

  • hab ich jetzt soweit gemacht und sehe gerade das mir nur noch 1 Errors übriggeblieben ist:
    (113) : fatal error 100: cannot read from file: "DL LINK"


    hab aber das Include drinnen.
    Wenn ich das ausklammer wird angezeigt das das nächste fehlt obwohl das nächste auch da ist



    @CaZe