Warnings wie kann ich sie wegbringen

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
  • if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(lspdcar); i++) { if(GetPlayerVehicleID(playerid)==lspdcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=1) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zum LSPD."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(regiecar); i++) { if(GetPlayerVehicleID(playerid)==regiecar[i]) { if(GetPVarInt(playerid,"Fraktion")!=2) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur REGIERUNG."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(hitcar); i++) { if(GetPlayerVehicleID(playerid)==hitcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=3) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur Hitman Agency."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(gscar); i++) { if(GetPlayerVehicleID(playerid)==gscar[i]) { if(GetPVarInt(playerid,"Fraktion")!=4) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur GroveStreet."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(armycar); i++) { if(GetPlayerVehicleID(playerid)==armycar[i]) { if(GetPVarInt(playerid,"Fraktion")!=5) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur ARMY."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(oamtcar); i++) { if(GetPlayerVehicleID(playerid)==oamtcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=6) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zum Oamt."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(mediccar); i++) { if(GetPlayerVehicleID(playerid)==mediccar[i]) { if(GetPVarInt(playerid,"Fraktion")!=7) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du bist kein Arzt."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(fwcar); i++) { if(GetPlayerVehicleID(playerid)==fwcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=8) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur Feuerwehr."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(swatcar); i++) { if(GetPlayerVehicleID(playerid)==swatcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=9) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur Swat."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(lcncar); i++) { if(GetPlayerVehicleID(playerid)==lcncar[i]) { if(GetPVarInt(playerid,"Fraktion")!=10) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du bist kein Mitglied der Lcn"); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(fbicar); i++) { if(GetPlayerVehicleID(playerid)==fbicar[i]) { if(GetPVarInt(playerid,"Fraktion")!=11) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zum FBI."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(fscar); i++) { if(GetPlayerVehicleID(playerid)==fscar[i]) { if(GetPVarInt(playerid,"Fraktion")!=12) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur Fahrschule."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(newscar); i++) { if(GetPlayerVehicleID(playerid)==newscar[i]) { if(GetPVarInt(playerid,"Fraktion")!=13) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zum CNN."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(yakcar); i++) { if(GetPlayerVehicleID(playerid)==yakcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=14) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur Yakuza."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(vagoscar); i++) { if(GetPlayerVehicleID(playerid)==vagoscar[i]) { if(GetPVarInt(playerid,"Fraktion")!=15) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Vagos."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(azencar); i++) { if(GetPlayerVehicleID(playerid)==azencar[i]) { if(GetPVarInt(playerid,"Fraktion")!=16) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Aztecas."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(rscar); i++) { if(GetPlayerVehicleID(playerid)==rscar[i]) { if(GetPVarInt(playerid,"Fraktion")!=17) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Red Solider."); } } } } return 1; if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(terrorcar); i++) { if(GetPlayerVehicleID(playerid)==terrorcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=18) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Terrormitgliedern."); } } } } if(newstate==PLAYER_STATE_DRIVER) { for(new i=0; i<sizeof(wheelcar); i++) { if(GetPlayerVehicleID(playerid)==wheelcar[i]) { if(GetPVarInt(playerid,"Fraktion")!=19) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,ROT,"Du gehörst nicht zur Wheelmen Agency"); } } } } return 1;


    muss ich irgendwo ein else oder so einbauen


    aso ja warnings


    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2498) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2513) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2528) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2543) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2558) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2573) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2588) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2603) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2618) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2633) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2648) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2663) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2678) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2693) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2708) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2723) : warning 225: unreachable code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2738) : warning 225: unreachable code
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    17 Warnings.



    wie kann ich das machen schreibe alles in einer Wurst will das nicht

  • Code
    if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(lspdcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==lspdcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=1)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zum LSPD.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(regiecar); i++)	    {	        if(GetPlayerVehicleID(playerid)==regiecar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=2)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur REGIERUNG.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(hitcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==hitcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=3)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur Hitman Agency.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(gscar); i++)	    {	        if(GetPlayerVehicleID(playerid)==gscar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=4)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur GroveStreet.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(armycar); i++)	    {	        if(GetPlayerVehicleID(playerid)==armycar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=5)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur ARMY.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(oamtcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==oamtcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=6)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zum Oamt.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(mediccar); i++)	    {	        if(GetPlayerVehicleID(playerid)==mediccar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=7)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du bist kein Arzt.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(fwcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==fwcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=8)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur Feuerwehr.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(swatcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==swatcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=9)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur Swat.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(lcncar); i++)	    {	        if(GetPlayerVehicleID(playerid)==lcncar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=10)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du bist kein Mitglied der Lcn");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(fbicar); i++)	    {	        if(GetPlayerVehicleID(playerid)==fbicar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=11)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zum FBI.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(fscar); i++)	    {	        if(GetPlayerVehicleID(playerid)==fscar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=12)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur Fahrschule.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(newscar); i++)	    {	        if(GetPlayerVehicleID(playerid)==newscar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=13)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zum CNN.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(yakcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==yakcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=14)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur Yakuza.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(vagoscar); i++)	    {	        if(GetPlayerVehicleID(playerid)==vagoscar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=15)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Vagos.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(azencar); i++)	    {	        if(GetPlayerVehicleID(playerid)==azencar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=16)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Aztecas.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(rscar); i++)	    {	        if(GetPlayerVehicleID(playerid)==rscar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=17)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Red Solider.");	            }	        }	    }	}	return 1;	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(terrorcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==terrorcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=18)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zu den Terrormitgliedern.");	            }	        }	    }	}	if(newstate==PLAYER_STATE_DRIVER)	{	    for(new i=0; i<sizeof(wheelcar); i++)	    {	        if(GetPlayerVehicleID(playerid)==wheelcar[i])	        {	            if(GetPVarInt(playerid,"Fraktion")!=19)	            {	                RemovePlayerFromVehicle(playerid);	                SendClientMessage(playerid,ROT,"Du gehörst nicht zur Wheelmen Agency");	            }	        }	    }	}	return 1;


    ok und warning


    Code
    C:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2498) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2513) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2528) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2543) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2558) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2573) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2588) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2603) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2618) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2633) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2648) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2663) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2678) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2693) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2708) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2723) : warning 225: unreachable codeC:\Users\Andreas Schuster\Desktop\Server\gamemodes\server.pwn(2738) : warning 225: unreachable codePawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    17 Warnings.




    schon wieder nicht wie mach ich das bitte

  • Du hast die kompletten return 1; falsch gesetzt.
    Du musst sie immer eine Klammer davor setzen.


    Und tu mir bitte einen Gefallen:
    Scheiß auf die Zeilenanzahl im Script, wenn du da selber nicht durchblickst
    verschaffst du dir eine Menge Ärger!!!!