bot fehler

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
  • ja hallo ich habe eine frag wenn ich complimire dann kommt der fehler bei meine bots
    hoffentlich könnt ihr mir helfen danke voraus
    C:\Users\faruk\Desktop\meganpcpack.pwn(62) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(64) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(72) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(74) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(82) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(84) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(92) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(94) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(102) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(104) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(112) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(114) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(122) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(124) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(132) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(134) : warning 219: local variable "npcname" shadows a variable at a preceding level
    C:\Users\faruk\Desktop\meganpcpack.pwn(142) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(142) : error 021: symbol already defined: "npcname"
    C:\Users\faruk\Desktop\meganpcpack.pwn(143) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(150) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(150) : error 021: symbol already defined: "npcname"
    C:\Users\faruk\Desktop\meganpcpack.pwn(151) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(158) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(158) : error 021: symbol already defined: "npcname"
    C:\Users\faruk\Desktop\meganpcpack.pwn(159) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(166) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(168) : warning 217: loose indentation
    C:\Users\faruk\Desktop\meganpcpack.pwn(171) : error 030: compound statement not closed at the end of file (started at line 114)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • #include <a_samp>
    #include <a_npc>


    new car1;
    new car2;
    new car3;
    new car4;
    new car5;
    new car6;
    new car7;
    new car8;
    new car9;
    new car10;
    new car11;
    new car12;
    new car13;


    public OnGameModeInit()
    {
    ConnectNPC("Mike","nps");
    ConnectNPC("Tom","np");
    ConnectNPC("Andrew","npe");
    ConnectNPC("Johnson","cpf");
    ConnectNPC("Anderson","ddd");
    ConnectNPC("Mathew","fff");
    ConnectNPC("Davidson","gg");
    ConnectNPC("Moralles","hh");
    ConnectNPC("Yards","tt");
    ConnectNPC("Kelroy","uu");
    ConnectNPC("Sarah","qq");
    ConnectNPC("Michael","xx");
    ConnectNPC("Roy","ccc");

    car1 = AddStaticVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
    car2 = AddStaticVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
    car3 = AddStaticVehicle(433, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
    car4 = AddStaticVehicle(596, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
    car5 = AddStaticVehicle(416, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 6);
    car6 = AddStaticVehicle(563, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 6);
    car7 = AddStaticVehicle(407, 2109.1763, 1503.0453, 32.2887, 82.2873, 6, 3);
    car8 = AddStaticVehicle(425, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);
    car9 = AddStaticVehicle(523, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
    car10 = AddStaticVehicle(538, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
    car11 = AddStaticVehicle(411, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 3);
    car12 = AddStaticVehicle(560, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);
    car13 = AddStaticVehicle(577, 2109.1763, 1503.0453, 32.2887, 82.2873, 1, 3);


    }


    public OnPlayerSpawn(playerid)
    {
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Mike", true))
    {
    PutPlayerInVehicle(playerid, car1, 0);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Tom", true))
    {
    PutPlayerInVehicle(playerid, car2, 1);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Andrew", true))
    {
    PutPlayerInVehicle(playerid, car3, 2);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Johnson", true))
    {
    PutPlayerInVehicle(playerid, car4, 3);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Anderson", true))
    {
    PutPlayerInVehicle(playerid, car5, 4);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Davidson", true))
    {
    PutPlayerInVehicle(playerid, car6, 5);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Moralles", true))
    {
    PutPlayerInVehicle(playerid, car7, 6);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Yards", true))
    {
    PutPlayerInVehicle(playerid, car8, 7);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Kelroy", true))
    {
    PutPlayerInVehicle(playerid, car9, 8);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Sarah", true))
    {
    PutPlayerInVehicle(playerid, car10, 9);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Michael", true))
    {
    PutPlayerInVehicle(playerid, car11, 10);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "Roy", true))
    {
    PutPlayerInVehicle(playerid, car12, 11);
    SetPlayerSkin(playerid, 255);
    ResetPlayerWeapons(playerid);
    }
    return 1;
    }
    return 1;
    }