Starwar/Stopwar/Warinfo | Auf German Elite Reallife Scipt verschieben | Bugt

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 aus einem anderem Server einen War Systeme raus gefischt.


    wollte dies ins German Elite Reallife Script einfügen doch es kommen error:



    }
    if(strcmp("/startwar", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(!IsAGangMember(playerid) || PlayerInfo[playerid][pTeam] == 2 || PlayerInfo[playerid][pTeam] == 8 || PlayerInfo[playerid][pTeam] == 10 || PlayerInfo[playerid][pTeam] == 15 || PlayerInfo[playerid][pTeam] == 21)
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Deine Gang/Fraktion ist nicht berechtigt diesen Befehl zu nutzen !");
    return 1;
    }
    if(PlayerInfo[playerid][pRank] < 11)
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Du brauchst Rank 11 oder höher!");
    return 1;
    }
    GetPlayerName(playerid, playername, sizeof(playername));
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Benutze: /startwar [Gegnerische GangID(/gangids)] [Grund]");
    return 1;
    }
    if(KassenInfo[PlayerInfo[playerid][pTeam]][tKasse] < 8000000)
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, " Deine Gang hat nicht genug Geld um ein WAR zu Starten! (8.000.000$)");
    return 1;
    }
    new GangID = strval(tmp),
    var = 0;
    if(GangID == -1 || GangID == 0 || GangID == 1 || GangID == 2 || GangID == 3 || GangID == 4 || GangID == 7 || GangID == 8 || GangID == 9 || GangID == 10 || GangID == 11 || GangID == 13 || GangID == 14 || GangID == 15 || GangID == 16)
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, " Gegen diese Gang kann kein Gangwar gestartet werden!");
    return 1;
    }
    if(GangID == PlayerInfo[playerid][pLeader] || GangID == PlayerInfo[playerid][pMember])
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, " Du kannst kein Gangwar gegen deine Gang Starten!");
    return 1;
    }
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Benutze: /startwar [Gegnerische GangID(/gangids)] [Grund]");
    return 1;
    }
    new HatSchon = 0;
    for(new i = 0; i < sizeof(GangWarSystemInfo); i++)
    {
    if(GangWarSystemInfo[i][GWActive] == 1)
    {
    if(PlayerInfo[playerid][pTeam] == GangWarSystemInfo[i][GWTeam1ID])
    {
    HatSchon += 1;
    }
    }
    }
    if(HatSchon > 5)
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, " Deine Gang hat bereits 5 Startwar's!");
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] != -1 || PlayerInfo[playerid][pMember] != -1 && PlayerInfo[playerid][pRank] == 11)
    {
    for(new i = 0; i < sizeof(GangWarSystemInfo); i++)
    {
    if(GangWarSystemInfo[i][GWActive] == 0)
    {
    new OwnerTeamText[20];
    if(PlayerInfo[playerid][pTeam] == 5) { OwnerTeamText = "La Cosa Nostra"; }
    else if(PlayerInfo[playerid][pTeam] == 6) { OwnerTeamText = "Yakuza"; }
    else if(PlayerInfo[playerid][pTeam] == 15) { OwnerTeamText = "Biker Boys"; }
    else if(PlayerInfo[playerid][pTeam] == 17) { OwnerTeamText = "Camorra"; }
    else if(PlayerInfo[playerid][pTeam] == 18) { OwnerTeamText = "V.L.Aztecas"; }
    else if(PlayerInfo[playerid][pTeam] == 19) { OwnerTeamText = "Grove Street"; }
    else if(PlayerInfo[playerid][pTeam] == 20) { OwnerTeamText = "Ballas"; }
    else if(PlayerInfo[playerid][pTeam] == 21) { OwnerTeamText = "West Coast Customs"; }
    else if(PlayerInfo[playerid][pTeam] == 22) { OwnerTeamText = "Triaden"; }
    else if(PlayerInfo[playerid][pTeam] == 23) { OwnerTeamText = "Red Soldiers"; }
    else if(PlayerInfo[playerid][pTeam] == 24) { OwnerTeamText = "L.S.Vagos"; }
    else if(PlayerInfo[playerid][pTeam] == 25) { OwnerTeamText = "Guerilla"; }
    else if(PlayerInfo[playerid][pTeam] == 26) { OwnerTeamText = "Cali Kartell"; }
    new GegnerTeamText[20];
    if(GangID == 5) { GegnerTeamText = "La Cosa Nostra"; }
    else if(GangID == 6) { GegnerTeamText = "Yakuza"; }
    else if(GangID == 15) { GegnerTeamText = "Biker Boys"; }
    else if(GangID == 17) { GegnerTeamText = "Camorra"; }
    else if(GangID == 18) { GegnerTeamText = "V.L.Aztecas"; }
    else if(GangID == 19) { GegnerTeamText = "Grove Street"; }
    else if(GangID == 20) { GegnerTeamText = "Ballas"; }
    else if(GangID == 21) { GegnerTeamText = "West Coast Customs"; }
    else if(GangID == 22) { GegnerTeamText = "Triaden"; }
    else if(GangID == 23) { GegnerTeamText = "Red Soldiers"; }
    else if(GangID == 24) { GegnerTeamText = "L.S.Vagos"; }
    else if(GangID == 25) { GegnerTeamText = "Guerilla"; }
    else if(GangID == 26) { GegnerTeamText = "Cali Kartell"; }
    format(string, sizeof(string), "%s hat ein Startwar für die %s gegen die %s gestartet,Grund: %s.", PlayerName(playerid),OwnerTeamText ,GegnerTeamText,result);
    ForAllPlayers(pl)
    {
    if(IsPlayerConnected(pl) && PlayerInfo[pl][pTeam] == PlayerInfo[playerid][pTeam])
    {
    SendClientMessage(pl, COLOR_YELLOW, string);
    }
    if(IsPlayerConnected(pl) && PlayerInfo[pl][pTeam] == GangID)
    {
    SendClientMessage(pl, COLOR_YELLOW, string);
    }
    }
    KassenInfo[PlayerInfo[playerid][pTeam]][tKasse] -= 8000000;
    GangWarSystemInfo[i][GWActive] = 1;
    GangWarSystemInfo[i][GWTeam1ID] = PlayerInfo[playerid][pTeam];
    GangWarSystemInfo[i][GWTeam2ID] = GangID;
    GangWarSystemInfo[i][GWTeam1Points] = 0;
    GangWarSystemInfo[i][GWTeam2Points] = 0;
    GangWarSystemInfo[i][GWErsteller] = PlayerInfo[playerid][pTeam];
    strmid(GangWarSystemInfo[i][GWReason], (result), 0, strlen(result), 255);
    SendClientMessage(playerid, COLOR_YELLOW, "Du hast erfolgreich einen GangWar gestartet.");
    var = 1;
    break;
    }
    }
    if(var == 0)
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Es ist kein Slot mehr frei für einen weiteren GangWar !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist kein Leader/Co-Leader !");
    }
    }
    return 1;
    }
    if(strcmp("/stopwar", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(!IsAGangMember(playerid) || PlayerInfo[playerid][pTeam] == 2 || PlayerInfo[playerid][pTeam] == 8 || PlayerInfo[playerid][pTeam] == 10 || PlayerInfo[playerid][pTeam] == 15 || PlayerInfo[playerid][pTeam] == 21)
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Deine Gang/Fraktion ist nicht berechtigt diesen Befehl zu nutzen !");
    return 1;
    }
    if(PlayerInfo[playerid][pRank] < 11)
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Du brauchst Rank 11 oder höher!");
    return 1;
    }
    GetPlayerName(playerid, playername, sizeof(playername));
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Benutze: /stopwar [GangWarID(/gangwars)]");
    return 1;
    }
    new GangWarID = strval(tmp);
    if(GangWarSystemInfo[GangWarID][GWErsteller] != PlayerInfo[playerid][pTeam])
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Nur der Ersteller kann das Gangwar Stoppen.");
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] != -1 || PlayerInfo[playerid][pMember] != -1 && PlayerInfo[playerid][pRank] >= 11)
    {
    if(GangWarSystemInfo[GangWarID][GWTeam1ID] == PlayerInfo[playerid][pTeam] || GangWarSystemInfo[GangWarID][GWTeam2ID] == PlayerInfo[playerid][pTeam])
    {
    GangWarSystemInfo[GangWarID][GWActive] = 0;
    GangWarSystemInfo[GangWarID][GWTeam1ID] = -1;
    GangWarSystemInfo[GangWarID][GWTeam2ID] = -1;
    GangWarSystemInfo[GangWarID][GWTeam1Points] = 0;
    GangWarSystemInfo[GangWarID][GWTeam2Points] = 0;
    strmid(GangWarSystemInfo[GangWarID][GWReason], "Kein Grund Angegeben", 0, strlen("Kein Grund Angegeben"), 255);
    SendClientMessage(playerid, COLOR_YELLOW, "Du hast erfolgreich einen GangWar beendet.");
    }
    else
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht der Leader/Co-Leader einer der teilnehmenden Gang's !");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist kein Leader/Co-Leader !");
    }
    }
    return 1;
    }
    if(strcmp("/warinfo", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(!IsAGangMember(playerid) || PlayerInfo[playerid][pTeam] == 2 || PlayerInfo[playerid][pTeam] == 8 || PlayerInfo[playerid][pTeam] == 10 || PlayerInfo[playerid][pTeam] == 15 || PlayerInfo[playerid][pTeam] == 21)
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Deine Gang/Fraktion ist nicht berechtigt diesen Befehl zu nutzen !");
    return 1;
    }
    if(PlayerInfo[playerid][pTeam] != -1)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "|__________ GangWar's __________|");
    for(new i = 0; i < sizeof(GangWarSystemInfo); i++)
    {
    if(GangWarSystemInfo[i][GWActive] == 1)
    {
    if(GangWarSystemInfo[i][GWTeam1ID] == PlayerInfo[playerid][pTeam] || GangWarSystemInfo[i][GWTeam2ID] == PlayerInfo[playerid][pTeam])
    {
    new Team1Text[20];
    if(GangWarSystemInfo[i][GWTeam1ID] == 5) { Team1Text = "La Cosa Nostra"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 6) { Team1Text = "Yakuza"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 15) { Team1Text = "Biker Boys"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 17) { Team1Text = "Camorra"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 18) { Team1Text = "V.L.Aztecas"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 19) { Team1Text = "Grove Street"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 20) { Team1Text = "Ballas"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 21) { Team1Text = "West Coast Customs"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 22) { Team1Text = "Triaden"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 23) { Team1Text = "Red Soldiers"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 24) { Team1Text = "L.S.Vagos"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 25) { Team1Text = "Guerilla"; }
    else if(GangWarSystemInfo[i][GWTeam1ID] == 26) { Team1Text = "Cali Kartell"; }
    new Team2Text[20];
    if(GangWarSystemInfo[i][GWTeam2ID] == 5) { Team2Text = "La Cosa Nostra"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 6) { Team2Text = "Yakuza"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 15) { Team2Text = "Biker Boys"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 17) { Team2Text = "Camorra"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 18) { Team2Text = "V.L.Aztecas"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 19) { Team2Text = "Grove Street"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 20) { Team2Text = "Ballas"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 21) { Team2Text = "West Coast Customs"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 22) { Team2Text = "Triaden"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 23) { Team2Text = "Red Soldiers"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 24) { Team2Text = "L.S.Vagos"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 25) { Team2Text = "Guerilla"; }
    else if(GangWarSystemInfo[i][GWTeam2ID] == 26) { Team2Text = "Cali Kartell"; }
    format(string, sizeof(string), "ID: %d | %s / %s | Stand: %d / %d Grund: %s", i, Team1Text, Team2Text, GangWarSystemInfo[i][GWTeam1Points], GangWarSystemInfo[i][GWTeam2Points], GangWarSystemInfo[i][GWReason]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    }
    }
    }
    }
    }
    return 1;
    }


    Meine Errors:

    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(23615) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24899) : error 017: undefined symbol "IsAGangMember"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24901) : error 017: undefined symbol "COLOR_ERRORTEXT"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24906) : error 017: undefined symbol "COLOR_BENUTZETEXT"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24913) : error 017: undefined symbol "COLOR_BENUTZETEXT"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 017: undefined symbol "KassenInfo"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : warning 215: expression has no effect
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 001: expected token: ";", but found "]"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 029: invalid expression, assumed zero
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : fatal error 107: too many error messages on one line


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



    8 Errors.
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(23616) : error 017: undefined symbol "PlayerName"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(23617) : error 017: undefined symbol "PlayerName"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(23615) : warning 204: symbol is assigned a value that is never used: "PlayerID"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 017: undefined symbol "KassenInfo"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : warning 215: expression has no effect
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 001: expected token: ";", but found "]"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 029: invalid expression, assumed zero
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : fatal error 107: too many error messages on one line


    Brauche Hilfe

  • Du hast wohl nicht die richtigen Variabeln.


    ändere einfach mal alles was "COLOR_BENUTZETEXT" heißt zu "RED" etc

  • Habe ich jetzt kam das



    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(23616) : error 017: undefined symbol "PlayerName"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(23617) : error 017: undefined symbol "PlayerName"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(23615) : warning 204: symbol is assigned a value that is never used: "PlayerID"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24899) : error 017: undefined symbol "IsAGangMember"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 017: undefined symbol "KassenInfo"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : warning 215: expression has no effect
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 001: expected token: ";", but found "]"
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : error 029: invalid expression, assumed zero
    C:\Users\korha\Desktop\German-Elite-Reallife\gamemodes\German-Elite-Reallife.pwn(24916) : fatal error 107: too many error messages on one line


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



    10 Errors.

  • Jung.. du musst schon selber etwas machen.
    Wir können dir zwar alles erklären aber dann lernst du nichts.


    Du siehst doch in den Errors das er Variablen nicht findet = Ergo diese Variablen existieren nicht, das wiederum heißt du musst Sie erstellen.

    ehm. Administration StateV ~ Domi