Gangwarsystem Probleme

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
  • Hallo ich habe so viele warnings xO


    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(128) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(129) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(130) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(131) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(132) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(133) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(134) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(135) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(135) : warning 213: tag mismatch
    C:\Users\Chenentano\Desktop\s\GER.pwn(136) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\GER.pwn(136) : warning 213: tag mismatch
    C:\Users\Chenentano\Desktops\GER.pwn(137) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\GGER.pwn(137) : warning 213: tag mismatch
    C:\Users\Chenentano\Desktop\\GER.pwn(138) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktop\\GER.pwn(138) : warning 213: tag mismatch
    C:\Users\Chenentano\DesktoGER.pwn(139) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\amemodes\GER.pwn(139) : warning 213: tag mismatch
    C:\Users\Chenentano\Deemodes\GER.pwn(140) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\memodes\GER.pwn(140) : warning 213: tag mismatch
    C:\Users\Chenentano\Deemodes\GER.pwn(141) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\memodes\GER.pwn(141) : warning 213: tag mismatch
    C:\Users\Chenentano\Desktoemodes\GER.pwn(142) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Deskemodes\GER.pwn(142) : warning 213: tag mismatch
    C:\Users\Chenentano\DesktopER.pwn(143) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Chenentano\Desktogamemodes\GER.pwn(143) : warning 213: tag mismatch
    C:\Users\Chenentano\Desktop\\gamemodes\GER.pwn(144) : error 018: initialization data exceeds declared size
    C:\Users\Chenentano\Desktop\.pwn(144) : error 001: expected token: "}", but found ";"


    Zeilen:


    new FightSystem[][fsSyS]={
    {
    {-1,18,-1,0,0,779.5656,-1639.3149, 1024.6346,-1411.4283,-1,0,874.6680,-1504.9249,12.7164},//Bss
    {-1,17,-1,0,0,2105.925, -2372.717, 2269.447, -2147.695,-1,0,2150.9788,-2256.2292,13.2986},//LS Hafen
    {-1,17,-1,0,0,986.386, 1809.776, 1185.533, 2049.596,-1,0,1066.4142,1883.8596,10.8203},//LV Container gebiet
    {-1,6,-1,0,0,-1869.358, 870.2093, -1656.91, 1130.577,-1,0,-1717.2057,1017.6675,17.5859},//SF Bank
    {-1,20,-1,0,0,-934.23, 1342.956, -537.1823, 1658.258,-1,0,-797.2783,1522.8790,26.9849},//LV Wüste
    {-1,24,-1,0,0,-624.3357,-199.8011, -423.9013,-36.6984,-1,0,-533.4424,-102.6740,63.2969},//Nahe Bauernhof
    {-1,24,-1,0,0,1828.318, -1946.361, 2075.502, -1756.869,-1,0,1956.6233,-1850.9685,4.1632},//Tanksten gebiet
    {-1,25,-1,0,0,1352.5580, 658.3295, 1557.2694, 797.5881,-1,0,1457.9932,738.5165,11.0234},//LV Nahe GRP YakuzaBase
    {-1,18,-1,0,0,-1424.701, 2230.474, -1132.754, 2639.2,-1,0,-1308.1746,2543.1692,87.7422},//Gangfight an den Tippies
    {-1,18,-1,0,0,-1496.5255,1461.5786, -1342.6473,1511.1339,-1,0,-1423.2755,1489.7532,1.8672},//Schiff Gebiet
    {-1,5,-1,0,0,1688.3701,2713.3540,1922.8389,2886.8803 ,-1,0,1797.1097,2784.0983,10.5630},//LV mit Pool
    {-1,22,-1,0,0,2228.4958,2713.3449,2462.1494,2827.0939 ,-1,0,2335.4101,2786.2687,10.5481},//LV an der Tanke
    {-1,6,-1,0,0,2527.4624,2233.3325,2677.5786,2484.3283 ,-1,0,2576.3649,2341.7500,17.8144},//LV am Hotel
    {-1,19,-1,0,0,-917.0397,1872.3411,-487.1890,2175.4853 ,-1,0,-781.0264,2115.3237,60.3828},//LV Staudam
    {-1,23,-1,0,0,-1522.6212,-1659.5980,-1318.6132,-1364.9719 ,-1,0,-1434.4113,-1540.5759,101.7578},//SF Am Mound Chilliad
    {-1,19,-1,0,0,-1858.2706,1370.4858,-1692.5876,1584.2093 ,-1,0,-1741.3501,1544.2088,7.1875}//SF Am Schiff
    };


    new Text:Fight,Text:FightUnderline,Text:FightBG,Text:Fight2;
    new FightTimer[2];


    Ich hoffe mir kann wer helfen :O

    Gothic 1 MP!
    Gothic-online.net


  • enum fsSyS{
    Float:fsMinX,
    Float:fsMinY,
    Float:fsMaxX,
    Float:fsMaxY,
    Float:fsCTFx,
    Float:fsCTFy,
    Float:fsCTFz,
    fsOwnerFaction,
    fsAttackFaction,
    fsKillsOfOwner,
    fsKillsOfAttack,
    fsFightTime,
    fsCTF[3],
    fsLastFight,
    fsZoneID,
    fsFlag,
    Text:fsWinFaction,
    Text:fsLoseFaction,
    Text:fsWinKills,
    Text:fsLoseKills,
    Text:fsTime,
    fsFightTimeCool
    };

    Gothic 1 MP!
    Gothic-online.net


  • Das sind viel zu viele. Definiere ein neues enum, welches der Größe des Arrays FightSystem entspricht.


    -1,18,-1,0,0,...
    ^ wie heißt das -1
    ^ wie heißt das 18
    ^ wie heißt das -1
    ^ wie heißt das 0
    ...


    Das enum muss genau so viele Stellen haben, wie das Array auch, 14 an der Zahl. Du kannst auch ohne enums arbeiten:
    new FightSystem[][14]={


    Aufruf erfolgt dann so:
    wasweisichwas = FightSystem[0][4]; //erste Zeile, 5. Argument => 0

  • stock GetZoneColorOfFaction(Faction){
    if(Faction == 6) return 0x00000062; // Yakuza
    else if(Faction == 12) return 0xB8860BAA; // Triaden
    else if(Faction == 5) return 0x00FFC076; // LCN
    else if(Faction == 17) return 0x00DDFFAB; // Atzen
    else if(Faction == 13) return 0x33AA33AA; // Grove Street
    else if(Faction == 14) return 0xFF00FF5E; // Ballas
    else if(Faction == 15) return 0x2E594F84; // Hells Angels
    else if(Faction == 16) return 0xFFFF00AA; // Vagos
    else if(Faction == 18) return 0x717DB468; // RIFAS
    else if(Faction == 19) return 0xFF000082; //RED SOLDIERS
    else if(Faction == 23) return 0xA66305AF; // MAFIA
    else return 0xFFFFFF77; // NoN-Gang
    }


    if(!fexist("Fightzones.cfg"))
    {
    new File:fFile=fopen("Fightzones.cfg",io_write);
    for(new fs;fs<sizeof(FightSystem);fs++)
    fwrite(fFile,"-14 -14 0 0 0\r\n");
    fclose(fFile);
    }


    Und hier die fightzones.cfg
    14 18 0 0 9 0
    5 23 0 0 0 0
    5 13 0 0 0 0
    5 5 0 0 0 0
    13 15 0 0 0 0
    13 16 0 0 0 0
    16 6 0 0 0 0
    16 23 0 0 0 0

    Gothic 1 MP!
    Gothic-online.net


  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Ich habe es geschafft den Fehler tu beheben.
    Die Gangzones werden nun angezeigt.


    Nun steht da deine Gang/Mafia ist bereits in einem fight :O


    Hier /invade


    // Gw system cho :O
    if(strcmp(cmdtext,"/flagge",true)==0)
    {
    if(IsAFightFaction(GetPlayerFaction(playerid)))
    {
    new TempZone = GetPlayerFightzone(playerid);
    if(TempZone != -14)
    {
    if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
    return SendClientMessage(playerid,FS_COL_GREY,"** Du darfst das nur zu Fuß machen ...");
    if(!FightSystem[TempZone][fsFightTime] || FightSystem[TempZone][fsAttackFaction] == -255)
    return SendClientMessage(playerid,FS_COL_GREY,"** Hier gibt es nichts zu erobern.");


    if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(playerid) || FightSystem[TempZone][fsAttackFaction] == GetPlayerFaction(playerid))
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,FightSystem[TempZone][fsCTFx],FightSystem[TempZone][fsCTFy],FightSystem[TempZone][fsCTFz]))
    {
    if(FightSystem[TempZone][fsCTF][0] != -255)
    {
    if(GetPlayerFaction(FightSystem[TempZone][fsCTF][0]) != GetPlayerFaction(playerid))
    SendClientMessage(playerid,FS_COL_GREY,"** Die Flagge wird von deinen Feinden erobert, töte sie zuerst!");
    else
    SendClientMessage(playerid,FS_COL_GREY,"** Deine Gang / Mafia erobert bereits die Flagge!");
    return 1;
    }
    FightSystem[TempZone][fsCTF][0] = playerid;
    new fsName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
    new fsText[128];
    format(fsText,sizeof(fsText),">>> Fight <<< | %s hat begonnen die Flagge zu erobern!",fsName);
    for(new i;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction] || GetPlayerFaction(i) == FightSystem[TempZone][fsAttackFaction])
    {
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsText);
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid,FS_COL_GREY,"** Du bist nicht in der nähe der Flagge!");
    }
    }
    else
    {
    SendClientMessage(playerid,FS_COL_GREY,"** Du bist nicht in diesem Fight verwickelt ...");
    }
    }
    else
    {
    SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keinem Gebiet!");
    }
    }
    else
    {
    SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keiner Gang / Mafia.");
    }
    return 1;
    }
    if(strcmp(cmdtext,"/einnehmen",true)==0){
    if(IsAFightFaction(GetPlayerFaction(playerid))){
    for(new fs;fs<sizeof(FightSystem);fs++){
    if((FightSystem[fs][fsOwnerFaction] == GetPlayerFaction(playerid) && FightSystem[fs][fsFightTime]) || FightSystem[fs][fsAttackFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Deine Gang / Mafia ist bereits in einem Fight.");
    }
    new on[2];
    on[0] = 0;
    on[1] = 0;
    for(new fs;fs<sizeof(FightSystem);fs++){
    for(new p=0;p<MAX_PLAYERS;p++)
    {
    if(GetPlayerFaction(p) == FightSystem[fs][fsOwnerFaction]) {
    on[0]++;
    }
    if(GetPlayerFaction(p) == GetPlayerFaction(playerid))
    {
    on[1]++;
    }
    }
    }
    if(testphase == 0) {
    if(on[0] <= 2) return SendClientMessage(playerid, COLOR_WHITE, "Es sind nicht genügend Gegner Online (mindestens 3)");
    if(on[1] <= 2) return SendClientMessage(playerid, COLOR_WHITE, "Es sind nicht genügend Mitglieder deiner Fraktion Online (mindestens 3)");
    }
    new TempZone = GetPlayerFightzone(playerid);
    if(TempZone != -255){
    if(FightSystem[TempZone][fsFightTimeCool] != 0) {
    format(stringx, sizeof(stringx), "Das Gebiet kann erst wieder in ca. %d Minuten erobert werden.", FightSystem[TempZone][fsFightTimeCool]);
    return SendClientMessage(playerid, FS_COL_GREY,stringx);
    }


    if(!IsAFightFaction(FightSystem[TempZone][fsOwnerFaction]))
    return SendClientMessage(playerid,FS_COL_GREY,"Gebiet wurde ausgeschaltet.");
    if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Man greift nicht seine eigenen Leute an.");
    if(FightSystem[TempZone][fsFightTime] || FightSystem[TempZone][fsAttackFaction] != -255)
    return SendClientMessage(playerid,FS_COL_GREY,"** In diesem Gebiet wird bereits geschossen.");
    if(FightSystem[TempZone][fsLastFight]){
    new fsText[178];
    format(fsText,sizeof(fsText),"Ganggebiet: Dieses Ganggebiet wurde bereits Angegriffen, wartet noch: '%d' Minuten.",FightSystem[TempZone][fsLastFight]);
    SendClientMessage(playerid,FS_COL_GREY,fsText);
    return 1;
    }
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsOwnerFaction] == FightSystem[TempZone][fsOwnerFaction] && (FightSystem[fs][fsFightTime] || FightSystem[fs][fsAttackFaction] != -255))
    return SendClientMessage(playerid,FS_COL_GREY,"Ganggebiet: Die Gang / Mafia der das Ganggebiet gehört hat bereits ein Kampf.");
    }
    new fsTextToOwner[255];
    format(fsTextToOwner,sizeof(fsTextToOwner),">>> Fight <<< | Ihr werden von: %s angegriffen, setzt euch zur wehr!",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    new fsName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
    new fsTextToAttack[255];
    format(fsTextToAttack,sizeof(fsTextToAttack),">>> Fight <<< | %s hat ein Kampf mit: %s begonnen, macht sie Platt!",fsName,GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    new fsText[64];
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsWinKills],"~y~00 Kills");
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsLoseKills],"~y~00 Kills");
    TextDrawSetString(FightSystem[TempZone][fsTime],"Verbl. Zeit: 30 Minuten");//ZEIT
    for(new i;i<MAX_PLAYERS;i++){
    if(IsPlayerConnected(i)){
    GangZoneFlashForPlayer(i,FightSystem[TempZone][fsZoneID],GetZoneColorOfFaction(GetPlayerFaction(playerid)));
    if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction]){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToOwner);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    if(GetPlayerFaction(i) == GetPlayerFaction(playerid)){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToAttack);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    }
    }
    FightSystem[TempZone][fsAttackFaction] = GetPlayerFaction(playerid);
    FightSystem[TempZone][fsKillsOfOwner] = 0;
    FightSystem[TempZone][fsKillsOfAttack] = 0;
    FightSystem[TempZone][fsFightTime] = 60;//ZEIT
    FightSystem[TempZone][fsFightTimeCool] = 1240;//ZEIT
    FightSystem[TempZone][fsCTF][0] = -255;
    FightSystem[TempZone][fsCTF][1] = 0;
    FightSystem[TempZone][fsCTF][2] = 0;
    return 1;
    }return SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keinem Gebiet!");
    }else SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keiner Gang / Mafia.");
    return 1;
    }


    Ist bei allen so außer bei den Triaden :O

    Gothic 1 MP!
    Gothic-online.net