Beiträge von oklinussi

    ok habs jetzt richtig gemacht was jetzt kommt ist
    F:\Neuer Ordner (2)\gamemodes\test.pwn(1166) : error 001: expected token: "-identifier-", but found "("
    F:\Neuer Ordner (2)\gamemodes\test.pwn(1169) : error 021: symbol already defined: "GetPlayerName"
    F:\Neuer Ordner (2)\gamemodes\test.pwn(1170) : error 010: invalid function or declaration


    stock SpielerName(playerid)<----1166
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));<---1169
    return name;<---1170
    }

    ok im test hat es jetzt geklappt doch im script kommt jetzt
    Zeile (813) : error 079: inconsistent return types (array & non-array)
    Zeile (816) : error 079: inconsistent return types (array & non-array)
    Zeile (821) : error 079: inconsistent return types (array & non-array)
    Zeile (828) : error 079: inconsistent return types (array & non-array)
    Zeile (831) : error 079: inconsistent return types (array & non-array)
    Zeile (857) : error 079: inconsistent return types (array & non-array)
    Zeile (860) : warning 225: unreachable code
    Zeile (860) : warning 217: loose indentation
    Zeile (870) : error 079: inconsistent return types (array & non-array)
    Zeile (873) : error 079: inconsistent return types (array & non-array)
    Zeile (877) : warning 217: loose indentation
    Zeile (877) : error 029: invalid expression, assumed zero
    Zeile (877) : error 004: function "OnPlayerEnterVehicle" is not implemented
    Zeile (879) : error 079: inconsistent return types (array & non-array)
    Zeile (882) : warning 225: unreachable code
    Zeile (882) : error 029: invalid expression, assumed zero
    Zeile (882) : error 004: function "OnPlayerExitVehicle" is not implemented
    Zeile (884) : error 079: inconsistent return types (array & non-array)
    Zeile (887) : warning 225: unreachable code
    Zeile (887) : error 029: invalid expression, assumed zero
    Zeile (887) : error 004: function "OnPlayerStateChange" is not implemented
    Zeile (889) : error 017: undefined symbol "newstate"
    Zeile (891) : error 017: undefined symbol "LSPDCAR"
    Zeile (891) : error 036: empty statement
    Zeile (891) : error 017: undefined symbol "i"
    Zeile (891) : fatal error 107: too many error messages on one line


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext,"/bsn",true)==0)
    {
    if(isPlayerAnAdmin(playerid,3))
    {
    ShowPlayerDialog(playerid,DIALOG_TUTORIAL,DIALOG_STYLE_MSGBOX,"BSN","Möchten sie wirklich zum BSN?","JA","NEIN");
    return 1; <--- 813
    }
    SendClientMessage(playerid,BLAU,"Du bist kein Admin.");
    return 1; <----- 816
    }
    if(strcmp(cmdtext,"/kill",true)==0)
    {
    SetPlayerHealth(playerid,0);
    return 1;<---- 821
    }
    if(strcmp(cmdtext,"/restart",true)==0)
    {
    if(isPlayerAnAdmin(playerid,5))
    {
    SendRconCommand("gmx");
    return 1;<---828
    }
    SendClientMessage(playerid,BLAU,"Du bist kein Admin.");
    return 1;<--- 831
    }
    if(strcmp(cmdtext,"/stats",true)==0)
    {
    new string[128];
    new fraktname[64];
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0:{fraktname="Keine";}
    case 1:{fraktname=fraktname1;}
    case 2:{fraktname=fraktname2;}
    case 3:{fraktname=fraktname3;}
    case 4:{fraktname=fraktname4;}
    case 5:{fraktname=fraktname5;}
    case 6:{fraktname=fraktname6;}
    case 7:{fraktname=fraktname7;}
    case 8:{fraktname=fraktname8;}
    case 9:{fraktname=fraktname9;}
    case 10:{fraktname=fraktname10;}
    case 11:{fraktname=fraktname11;}


    }
    //1 reihe
    format(string,sizeof(string),"[Name: %s] [Level: %i] [Adminlevel: %i] [Fraktion: %s] [Zeit seit Payday:%iminuten]",SpielerName(playerid),GetPlayerScore(playerid),GetPVarInt(playerid,"Adminlevel"),fraktname,GetPVarInt(playerid,"Paytime"));
    SendClientMessage(playerid,BLAU,string);
    //2 reihe
    return 1;<---- 857



    if(strcmp(cmdtext,"/nschild",true)==0)<-----860
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new vehicleid;
    vehicleid=GetPlayerVehicleID(playerid);
    SetVehicleNumberPlate(vehicleid,"Test");
    SetVehicleToRespawn(vehicleid);
    PutPlayerInVehicle(playerid,vehicleid,0);
    }
    return 1;<------ 870


    }
    return 0;<---873
    }



    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)<--877
    {
    return 1;<--879
    }


    public OnPlayerExitVehicle(playerid, vehicleid)<----882
    {
    return 1;<----884
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)<---887
    {
    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new i=0; i<sizeof(LSPDCAR); i++)<----891


    {
    if(GetPlayerVehicleID(playerid)==LSPDCAR[i])
    {
    if(GetPVarInt(playerid,"Fraktion")!=1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Du darfst dieses Fahrzeug nicht fahren.");
    }
    }
    }
    }
    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new g=0; g<sizeof(GSCAR); g++)


    {
    if(GetPlayerVehicleID(playerid)==GSCAR[g])
    {
    if(GetPVarInt(playerid,"Fraktion")!=5)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Du darfst dieses Fahrzeug nicht fahren.");
    }
    }
    }
    }


    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new ma=0; ma<sizeof(MAFIACAR); ma++)


    {
    if(GetPlayerVehicleID(playerid)==MAFIACAR[ma])
    {
    if(GetPVarInt(playerid,"Fraktion")!=2)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Du darfst dieses Fahrzeug nicht fahren.");
    }
    }
    }


    }


    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new o=0; o<sizeof(OAMTCAR); o++)


    {
    if(GetPlayerVehicleID(playerid)==OAMTCAR[o])
    {
    if(GetPVarInt(playerid,"Fraktion")!=9)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Du darfst dieses Fahrzeug nicht fahren.");
    }
    }
    }


    }



    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new me=0; me<sizeof(MEDICCAR); me++)


    {
    if(GetPlayerVehicleID(playerid)==MEDICCAR[me])
    {
    if(GetPVarInt(playerid,"Fraktion")!=3)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Du darfst dieses Fahrzeug nicht fahren.");
    }
    }
    }


    }



    return 1;
    }

    also ich hatte schon mal einen thread Pawno problem
    und zwar kriege ich immer
    Zeile (12) : warning 235: public function lacks forward declaration (symbol "OnPlayerDisconnect")
    Zeile (14) : error 017: undefined symbol "GetPVarInt"
    Zeile (16) : error 012: invalid function call, not a valid address
    Zeile (16) : warning 215: expression has no effect
    Zeile (16) : error 001: expected token: ";", but found ")"
    Zeile (16) : error 029: invalid expression, assumed zero
    Zeile (16) : fatal error 107: too many error messages on one line
    wenn ich
    new bsnenter;
    new bsnexit;
    new tor[2];
    new botauto;
    new GSCAR[9];//GSCAR[0]=,GSCAR[1]
    new MAFIACAR[15];//MAFIACAR[0]=
    new OAMTCAR[12];//OAMTCAR[0]=
    new MEDICCAR[16];//MEDICCAR[0]=
    new SpielerSpeichern[100];



    public OnPlayerDisconnect(playerid, reason)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    SpielerSpeichern(playerid);
    }
    return 1;
    }
    zusammen in ein script einfüge kann mir villeicht jemand sagen wo da das problem ist ?

    wenn ich bei dem tutorial script das rein kopiere kommt der fehler das erste mal


    [pwn] new bsnenter;
    new bsnexit;
    new tor[2];
    new botauto;
    new GSCAR[9];//GSCAR[0]=,GSCAR[1]
    new MAFIACAR[15];//MAFIACAR[0]=
    new OAMTCAR[12];//OAMTCAR[0]=
    new MEDICCAR[16];//MEDICCAR[0]=
    new SpielerSpeichern[100];
    [pwn]

    whut?
    Und warum verwendest du dann diese Funktion?



    hab ihn gefundne sry stock SpielerSpeichern(playerid)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
    dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
    dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
    dini_IntSet(Spielerdatei,"Baned",GetPVarInt(playerid,"Baned"));
    dini_IntSet(Spielerdatei,"timeban",GetPVarInt(playerid,"timeban"));
    dini_IntSet(Spielerdatei,"Paytime",GetPVarInt(playerid,"Paytime"));
    dini_IntSet(Spielerdatei,"SkinID",GetPVarInt(playerid,"SkinID"));
    }
    return 1;
    }

    So jetzt nochmal zum nachdenken. Wo hast du den Fehler? Also in welcher Zeile ganz genau??


    public OnPlayerDisconnect(playerid, reason)
    {
    if(GetPVarInt(playerid,"loggedin")==0)
    {
    SpielerSpeichern(playerid);<--------
    }
    return 1;
    }


    in der zeile diese fehler
    Zeile (656) : error 012: invalid function call, not a valid address
    Zeile (656) : warning 215: expression has no effect
    Zeile (656) : error 001: expected token: ";", but found ")"
    Zeile (656) : error 029: invalid expression, assumed zero
    Zeile (656) : fatal error 107: too many error messages on one line





    hab den stock gefunden
    stock SpielerSpeichern(playerid)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
    dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
    dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
    dini_IntSet(Spielerdatei,"Baned",GetPVarInt(playerid,"Baned"));
    dini_IntSet(Spielerdatei,"timeban",GetPVarInt(playerid,"timeban"));
    dini_IntSet(Spielerdatei,"Paytime",GetPVarInt(playerid,"Paytime"));
    dini_IntSet(Spielerdatei,"SkinID",GetPVarInt(playerid,"SkinID"));
    }
    return 1;
    }

    ja aber dann wird der spieler ja nicht gespeichert . und wenn ich das weg machen kommt
    Zeile (785) : error 012: invalid function call, not a valid address
    Zeile (785) : warning 215: expression has no effect
    Zeile (785) : error 001: expected token: ";", but found ")"
    Zeile (785) : error 029: invalid expression, assumed zero
    Zeile (785) : fatal error 107: too many error messages on one line


    ocmd:setadmin(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,ROT,"Du bist kein Admin.");
    new pID, rank;
    if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,ROT,"/setadmin [spieler] [level]");
    if(rank<1||rank>5)return SendClientMessage(playerid,ROT,"Bitte gültigen Rang angeben.");
    SetPVarInt(pID,"Adminlevel",rank);
    SpielerSpeichern(pID)<--------
    SendClientMessageToAll(BLAU,"Es wurde jemand zu Admin gemacht.");
    return 1;
    }

    Ich kriege immer
    Zeile (656) : error 012: invalid function call, not a valid address
    Zeile (656) : warning 215: expression has no effect
    Zeile (656) : error 001: expected token: ";", but found ")"
    Zeile (656) : error 029: invalid expression, assumed zero
    Zeile (656) : fatal error 107: too many error messages on one line


    public OnPlayerDisconnect(playerid, reason)
    {
    if(GetPVarInt(playerid,"loggedin")==0)
    {
    SpielerSpeichern(playerid);
    }
    return 1;
    }

    bitte um hilfe

    jetzt bekomme ich
    Zeile (79) : warning 203: symbol is never used: "GSCAR"
    Zeile (79) : warning 203: symbol is never used: "MAFIACAR"
    Zeile (79) : warning 203: symbol is never used: "MEDICCAR"
    Zeile (79) : warning 203: symbol is never used: "OAMTCAR"
    Zeile (79) : warning 203: symbol is never used: "SpielerSpeichern"
    Zeile (79) : warning 203: symbol is never used: "botauto"
    Zeile (79) : warning 203: symbol is never used: "bsnenter"
    Zeile (79) : warning 203: symbol is never used: "bsnexit"
    Zeile (79) : warning 203: symbol is never used: "tor"
    aber zeile 79 ist


    #define Spielerdaten
    #undef Spielerdaten
    #endinput
    main()
    {
    print("\n----------------------------------");
    print("German Reallife made by KillerClay (Skripter) sowie Nulliver(carspawns usw.) und Mr.Black(Maper");
    print("----------------------------------\n");
    }


    hab mal meine main mit kopiert

    Zeile (641) : warning 219: local variable "name" shadows a variable at a preceding level
    Zeile (643) : error 017: undefined symbol "spielerdaten"
    Zeile (643) : error 017: undefined symbol "spielerdaten"
    Zeile (658 ) : error 012: invalid function call, not a valid address
    Zeile (658 ) : warning 215: expression has no effect
    Zeile (658 ) : error 001: expected token: ";", but found ")"
    Zeile (658 ) : error 029: invalid expression, assumed zero
    Zeile (658 ) : fatal error 107: too many error messages on one line
    public OnPlayerConnect(playerid)
    {
    if(IsPlayerNPC(playerid))return 1;
    new Spielerdaten[100];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    format(spielerdaten,sizeof spielerdaten,"/Accounts/%s.txt",name);
    if(dini_Exists(Spielerdaten))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
    }
    return 1;
    }
    public OnPlayerDisconnect(playerid, reason)
    {
    if(GetPVarInt(playerid,"loggedin")==0)
    {
    SpielerSpeichern(playerid);
    }
    return 1;
    }
    das bekomm ich wenn ich es lösche