Wiederholungs-Fehler verstehe ich nicht

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
  • Hi,


    ich kriege diese Errors:


    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(91) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(98) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(105) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(112) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(119) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(126) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(133) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(140) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(147) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(154) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(161) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(168) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(175) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(182) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(189) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(196) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(203) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(210) : error 010: invalid function or declaration
    F:\imaczeuch\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\survivorvszombie.pwn(216) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    19 Errors.


    Bei diesem Skript:


    public OnPlayerRequestClass(playerid, classid)
    {
    if(classid == 0)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 1)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 2)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 3)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 4)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 5)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 6)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 7)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 8)
    {
    gTeam[playerid] = TEAM_SURVIVOR;
    SetPlayerPos(playerid, 1575.8318,-1474.6329,14.2257);
    SetPlayerCameraPos(playerid, 1577.8318,-1474.6329,14.2257);
    SetPlayerCameraLookAt(playerid, 1575.8318,-1474.6329,14.2257);}
    }
    if(classid == 9)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 10)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 11)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 12)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 13)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 14)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 15)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 16)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 17)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    }
    if(classid == 18)
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    SetPlayerPos(playerid, 1131.2404,-1330.4763,13.6037);
    SetPlayerCameraPos(playerid, 1135.2404,-1330.4763,13.6037);
    SetPlayerCameraLookAt(playerid, 1131.2404,-1330.4763,13.6037);}
    return 1;
    }


    Die Errors sind immer beim if(classid == ~)


    Ich verstehe nicht was Falsch ist :(


    MfG

    Zitat

    Nimm die Dinge wie sie sind: schlag, wenn du schlagen musst, tritt, wenn du Treten musst
    -Bruce Lee

  • Öhm kein wunder,weil RequestSpawn nicht den Spieler Spawnt sondern nur die gezeigte Model ID darstellt(hab den satz selbst net gecheckt)
    Also z.B

    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, X,Y,Z);
    SetPlayerFacingAngle(playerid, 120);
    SetPlayerCameraPos(playerid, X,Y,Z);
    SetPlayerCameraLookAt(playerid, X,Y,Z);
    gPlayerClass[playerid] = classid;
    switch (classid) {
    case 0: {
    pclass[playerid]=0;
    }
    case 1: {
    GameTextForPlayer(playerid,"~g~Grove Street",4000,3);
    pclass[playerid]=1;
    }
    case 2: {
    GameTextForPlayer(playerid,"~b~Los Aztecas",4000,3);
    pclass[playerid]=2;
    SetPlayerColor(playerid, COLOR_SEAGREEN);
    }
    case 3: {
    Oder so musst ma bei onplayerspawn reinmachen vllt gehts dann ja :D