Fraktion Spawn Errors die ich nicht verstehe.

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
  • Ich habe mir das LSPD und das FBI gescriptet, aber wenn ich das mit dem Frakktions Spawn bei "OnPlayerConnect" mache,
    kommen 5 Errors und 2 Warnings die ich nicht verstehe.


    Hoffe mir kann jemand weiterhelfen.



    Errors :
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1237) : error 002: only a single statement (or expression) can follow each "case"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1237) : warning 215: expression has no effect
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1238) : error 014: invalid statement; not in switch
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1238) : warning 215: expression has no effect
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1238) : error 001: expected token: ";", but found ":"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1238) : error 029: invalid expression, assumed zero
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1238) : fatal error 107: too many error messages on one line


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



    5 Errors.



    Error Zeilen:
    public OnPlayerSpawn(playerid)
    {
    //________________________FraktionSpawn________________________
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0:SetPlayerPos(playerid,lspdspawn);SetPlayerInterior(playerid,3);SetPlayerColor(playerid,Hellblau);GivePlayerWeapon(playerid,24,100);GivePlayerWeapon(playerid,31,50);SetPlayerSkin(playerid,266);
    case 1:SetPlayerPos(playerid,fbispawn);SetPlayerInterior(playerid,10);SetPlayerColor(playerid,Blau);GivePlayerWeapon(playerid,24,100);GivePlayerWeapon(playerid,31,50);SetPlayerSkin(playerid,286);
    }
    }



    Hoffe auf schnelle Antwort.


    Mfg

    Mit unfreundlichen Grüßen
    Buschmensch

  • Hey


    Versuch mal so


    public OnPlayerSpawn(playerid)
    {
    //________________________FraktionSpawn________________________
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0:{SetPlayerPos(playerid,lspdspawn);SetPlayerInterior(playerid,3);SetPlayerColor(playerid,Hellblau);GivePlayerWeapon(playerid,24,100);GivePlayerWeapon(playerid,31,50);SetPlayerSkin(playerid,266);}
    case 1:{SetPlayerPos(playerid,fbispawn);SetPlayerInterior(playerid,10);SetPlayerColor(playerid,Blau);GivePlayerWeapon(playerid,24,100);GivePlayerWeapon(playerid,31,50);SetPlayerSkin(playerid,286);}
    }
    }


    nach case 0: ne { und ganz zuschluss ne } so hab ich es auch ;)


    mfg

  • Dann passiert das 8|


    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1286) : error 017: undefined symbol "isPlayerAnAdmin"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1298) : error 017: undefined symbol "isPlayerAnSupporter"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1310) : error 017: undefined symbol "isPlayerAnSupporter"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1322) : error 017: undefined symbol "isPlayerAnAdmin"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1334) : error 017: undefined symbol "isPlayerAnAdmin"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1337) : error 017: undefined symbol "sscanf"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1346) : error 017: undefined symbol "isPlayerAnSupporter"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1348) : error 035: argument type mismatch (argument 2)
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1348) : error 035: argument type mismatch (argument 2)
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1349) : error 017: undefined symbol "sscanf"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1358) : error 017: undefined symbol "isPlayerInFrakt"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1360) : error 017: undefined symbol "sscanf"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1362) : error 017: undefined symbol "SpielerName"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1364) : error 017: undefined symbol "SpielerName"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1366) : error 017: undefined symbol "SpielerSpeichern"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1373) : error 017: undefined symbol "isPlayerInFrakt"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1379) : error 017: undefined symbol "sscanf"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1381) : error 017: undefined symbol "SpielerName"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1383) : error 017: undefined symbol "SpielerName"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1394) : error 017: undefined symbol "isPlayerInFrakt"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1397) : error 017: undefined symbol "sscanf"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1417) : error 017: undefined symbol "isPlayerInFrakt"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1419) : error 017: undefined symbol "sscanf"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1431) : error 017: undefined symbol "isPlayerInFrakt"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1433) : error 017: undefined symbol "sscanf"
    C:\Users\Richard\Desktop\NYCR\gamemodes\NYCR.pwn(1445) : error 017: undefined symbol "isPlayerInFrakt"


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



    26 Errors.

    Mit unfreundlichen Grüßen
    Buschmensch