4 Errors beim Car defined!!!

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
  • new SetPlayerToTeamColor;
    public Spectator()
    {
    new string[256];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(KickPlayer[i]==1) { Kick(i); }
    else if(KickPlayer[i]==2) { Ban(i); }
    //if(GetPlayerPing(i) >= 500 && PlayerInfo[i][pAdmin] < 1) { Kick(i); }
    if(Spectate[i] < 253 && Spectate[i] != 255)
    {
    SetPlayerColor(i,COLOR_SPEC);
    TogglePlayerControllable(i, 0);
    new targetid = Spectate[i];
    if(IsPlayerConnected(targetid))
    {
    TogglePlayerSpectating(i, 1);
    if(PlayerInfo[i][pAdmin] >= 1)
    {
    new Float:health;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(targetid, name, sizeof(name));
    GetPlayerHealth(targetid, health);
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~health:%.1f",name,targetid,health);
    GameTextForPlayer(i, string, 2500, 3);
    }
    if(IsPlayerInAnyVehicle(targetid))
    {
    new carid = GetPlayerVehicleID(targetid);
    PlayerSpectateVehicle(i, carid);
    }
    else
    {
    PlayerSpectatePlayer(i, targetid);
    }
    if(GetPlayerInterior(targetid) == 0)
    {
    SetPlayerInterior(i,0);
    }
    else if(GetPlayerInterior(targetid) > 0)
    {
    SetPlayerInterior(i,GetPlayerInterior(targetid));
    }
    }//Targetid connected
    }
    if(Spectate[i] == 253)
    {
    TogglePlayerControllable(i, 1);
    TogglePlayerSpectating(i, 0);
    SetPlayerToTeamColor(i); <---das ist der Fehler glaube ich!!!
    SetPlayerInterior(i,Unspec[i][sPint]);
    PlayerInfo[i][pInt] = Unspec[i][sPint];
    PlayerInfo[i][pLocal] = Unspec[i][sLocal];
    Unspec[i][sLocal] = 255;
    SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
    gTeam[i] = PlayerInfo[i][pTeam];
    MedicBill[i] = 0;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][Coords][0], Unspec[i][Coords][1], Unspec[i][Coords][2], 10.0, -1, -1, -1, -1, -1, -1);
    SpawnPlayer(i);
    SetCameraBehindPlayer(i);
    }
    else


    SpawnPlayer(i);
    }
    Spectate[i] = 255;
    }
    if(Spectate[i] == 254)
    {
    TogglePlayerControllable(i, 1);
    SetPlayerInterior(i,Unspec[i][sPint]);
    PlayerInfo[i][pInt] = Unspec[i][sPint];
    PlayerInfo[i][pLocal] = Unspec[i][sLocal];
    SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
    Spectate[i] = 255;
    }
    if(Spectate[i] == 256)
    {
    SetPlayerToTeamColor;
    Spectate[i] = 255;
    }
    if(Spectate[i] == 257)
    {
    Spectate[i] = 254;
    }
    }
    }
    }




    Errors!!!!: eallife.pwn(1732) :
    error 012: invalid function call, not a valid address
    reallife.pwn(1732) : warning 215: expression has no effect
    reallife.pwn(1732) : error 001: expected token: ";", but found ")"
    reallife.pwn(1732) : error 029: invalid expression, assumed zero
    reallife.pwn(1732) : fatal error 107: too many error messages on one line


    Was kann ich tun? Brauche Hillfe

  • Vllt verstehst dus, wenn mans so beschreibt:
    Altes Script:
    new lspdtor;
    lspdtor=CreateObject(...);
    if(strcmp(cmdtext,"/auf",true)==0) {
    MoveObject(lspdtor,....); }
    return 1;
    }
    neues Script (aus alten rauskopiert):
    if(strcmp(cmdtext,"/auf",true)==0) {
    MoveObject(lspdtor,....); }
    return 1;
    }
    Bäähhmm undefinted symbol "lspdtor", so musst du dann auch die deklaration mitkopieren