script error selfmate

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
  • gute tag ich habe eine frage was soll ich dar mache . habe wiegen mysql gemacht aber kommt diesen fehler.
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(59) : error 001: expected token: "-identifier-", but found "-integer value-"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(62) : error 021: symbol already defined: "mysql_format"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(65) : error 021: symbol already defined: "TogglePlayerSpectating"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(66) : error 010: invalid function or declaration
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(40) : warning 204: symbol is assigned a value that is never used: "Handle"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(40 -- 266) : warning 203: symbol is never used: "query"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




    4 Errors.


  • #include <a_samp>
    #include <a_mysql>
    #include <md5>
    //Mysql Daten



    #define MYSQL_HOST "127.0.0.1"
    #define MYSQL_USER "root"
    #define MYSQL_DATA "tut"
    #define MYSQL_PASS ""
    new Handle;



    //Dialoge
    #define DIALOG_REGISTER 1
    #define DIALOG_CHAR1 2
    #define DIALOG_CHAR2 3
    #define DIALOG_CHAR3 4
    #define DIALOG_LOGIN 5



    //Farben
    #define gelb 0xFFFA00FF
    #define weiß 0xFAFAFAFF



    main()
    {
    print("\n----------------------------------");
    print(" [GRG]testserver");
    print("----------------------------------\n");
    }





    public OnGameModeInit()
    {
    //Gamemode

    SetGameModeText("[GRG] testserver");

    //Mysql Verbindung

    Handle=mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_DATA,MYSQL_PASS);
    if(mysql_errno() < 1)print("MYSQL: Die Verbindung wurde Erfolgreich hergestellt."),
    mysql_log(LOG_ALL);else print ("MYSQL: Die Verbindung zum mysql Server konnte nicht hergestellt werden. | Server wird heruntergefahren.");
    return 1;
    }



    public OnGameModeExit()
    {
    return 1;
    }



    public OnPlayerRequestClass(playerid, classid)
    {
    SetSpawnInfo(playerid,0,0,0,0,0,0,0,0,0,0,0,0);
    SpawnPlayer(playerid);

    return 1;
    }



    public 0(playerid)
    {
    new query[256];
    mysql_format(Handle, query, sizeof(query),"SELECT * FROM user WHERE Username='%e'",Spielername(playerid));
    mysql_tquery(Handle,query,"UserCheck,"i",playerid);
    ClearChat(playerid);
    TogglePlayerSpectating(playerid,1);
    return 1;
    }



    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }



    public OnPlayerSpawn(playerid)
    {
    ClearChat(playerid);
    SendClientMessage(playerid,gelb,"es Halt: Willkommen Auf LS-Airport wir wünschen ihnen einem schönen aufenhalt");
    SetPlayerPos(playerid,1614.8796,-2333.6069,13.5469);
    SetPlayerFacingAngle(playerid,1.0462);
    return 1;
    }



    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }



    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }



    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }



    public OnPlayerText(playerid, text[])
    {
    return 1;
    }



    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/hilfe", cmdtext, true, 10) == 0)
    {
    //die Befehle kommen noch
    return 1;
    }
    return 0;
    }



    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }



    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }



    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }



    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }



    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }



    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }



    public OnRconCommand(cmd[])
    {
    return 1;
    }



    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }



    public OnObjectMoved(objectid)
    {
    return 1;
    }



    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }



    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }



    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }



    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }



    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }



    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }



    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }



    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }



    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }



    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }



    public OnPlayerUpdate(playerid)
    {
    return 1;
    }



    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }



    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }



    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }



    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }



    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    return 1;
    }



    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }



    //Anderes
    stock Spielername(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    return name;
    }



    stock ClearChat(playerid)
    {
    for (new i= 0;i<100;i++)
    {
    SendClientMessage(playerid,weiß,"");
    }
    return 1;
    }



  • so? aber habe gemacht aber immer noch der fehler public 0(playerid){ new query[256]; mysql_format(Handle, query, sizeof(query),"SELECT * FROM user WHERE Username='%e'",Spielername(playerid)); mysql_tquery(Handle,query,"UserCheck","i",playerid); ClearChat(playerid); TogglePlayerSpectating(playerid,1); return 1;

    Einmal editiert, zuletzt von ShadowKev1999 () aus folgendem Grund: habe noch was vergessen zu schreiben

  • Einen Public sollte denke ich nicht als Zahl benannt sein, mach mal


    Code
    public CheckUser(playerid)
    {
        new query[256];
        mysql_format(Handle, query, sizeof(query),"SELECT * FROM user WHERE Username='%e'",Spielername(playerid));
        mysql_tquery(Handle,query,"UserCheck",i,playerid);
        ClearChat(playerid);
         TogglePlayerSpectating(playerid,1);
        return 1;
    }

    Die Kritik an anderen hat noch keinem die eigene Leistung erspart.

    – Noël Coward

  • jetzt sind die error:
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(59) : warning 235: public function lacks forward declaration (symbol "CheckUser")
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(63) : error 017: undefined symbol "i"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(65) : warning 217: loose indentation
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(66) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




    1 Error.

  • Versuch es mal so :P

    Code
    forward CheckUser(playerid);
    public CheckUser(playerid)
    {
        new query[256];
        mysql_format(Handle, query, sizeof(query),"SELECT * FROM user WHERE Username='%e'",Spielername(playerid));
        mysql_tquery(Handle,query,"UserCheck","i",playerid);
        ClearChat(playerid);
         TogglePlayerSpectating(playerid,1);
        return 1;
    }

    Die Kritik an anderen hat noch keinem die eigene Leistung erspart.

    – Noël Coward

  • es sind nur noch 2 warning
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(66) : warning 217: loose indentation
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(67) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




    2 Warnings.


  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • ich verstehe das es nicht mehr ich habe noch mehr error:
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(66) : warning 217: loose indentation
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(67) : warning 217: loose indentation
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : error 001: expected token: ";", but found ")"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(264) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 202: number of arguments does not match definition
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 215: expression has no effect
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : error 001: expected token: ";", but found ")"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutoial.pwn(270) : warning 215: expression has no effect
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




    4 Errors.




    mein script
    #include <a_samp>
    #include <a_mysql>
    #include <md5>
    //Mysql Daten



    #define MYSQL_HOST "127.0.0.1"
    #define MYSQL_USER "root"
    #define MYSQL_DATA "tut"
    #define MYSQL_PASS ""
    new Handle;



    //Dialoge
    #define DIALOG_REGISTER 1
    #define DIALOG_CHAR1 2
    #define DIALOG_CHAR2 3
    #define DIALOG_CHAR3 4
    #define DIALOG_LOGIN 5



    //Farben
    #define gelb 0xFFFA00FF
    #define weiß 0xFAFAFAFF



    main()
    {
    print("\n----------------------------------");
    print(" [GRG]testserver");
    print("----------------------------------\n");
    }





    public OnGameModeInit()
    {
    //Gamemode

    SetGameModeText("[GRG] testserver");

    //Mysql Verbindung

    Handle=mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_DATA,MYSQL_PASS);
    if(mysql_errno() < 1)print("MYSQL: Die Verbindung wurde Erfolgreich hergestellt."),
    mysql_log(LOG_ALL);else print ("MYSQL: Die Verbindung zum mysql Server konnte nicht hergestellt werden. | Server wird heruntergefahren.");
    return 1;
    }



    public OnGameModeExit()
    {
    return 1;
    }



    public OnPlayerRequestClass(playerid, classid)
    {
    SetSpawnInfo(playerid,0,0,0,0,0,0,0,0,0,0,0,0);
    SpawnPlayer(playerid);

    return 1;
    }



    forward CheckUser(playerid);
    public CheckUser(playerid)
    {
    new query[256];
    mysql_format(Handle, query, sizeof(query),"SELECT * FROM user WHERE Username='%e'",Spielername(playerid));
    mysql_tquery(Handle,query,"UserCheck","i",playerid);
    ClearChat(playerid);
    TogglePlayerSpectating(playerid,1);
    return 1;
    }






    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }



    public OnPlayerSpawn(playerid)
    {
    ClearChat(playerid);
    SendClientMessage(playerid,gelb,"es Halt: Willkommen Auf LS-Airport wir wünschen ihnen einem schönen aufenhalt");
    SetPlayerPos(playerid,1614.8796,-2333.6069,13.5469);
    SetPlayerFacingAngle(playerid,1.0462);
    return 1;
    }



    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }



    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }



    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }



    public OnPlayerText(playerid, text[])
    {
    return 1;
    }



    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/hilfe", cmdtext, true, 10) == 0)
    {
    //die Befehle kommen noch
    return 1;
    }
    return 0;
    }



    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }



    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }



    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }



    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }



    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }



    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }



    public OnRconCommand(cmd[])
    {
    return 1;
    }



    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }



    public OnObjectMoved(objectid)
    {
    return 1;
    }



    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }



    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }



    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }



    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }



    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }



    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }



    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }



    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }



    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }



    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }



    public OnPlayerUpdate(playerid)
    {
    return 1;
    }



    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }



    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }



    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }



    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }



    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    return 1;
    }



    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }




    //MYSQL Datenbanken Irgenwas
    forward UserCheck(playerid);
    public UserCheck(playerid)
    {
    new num_rows, num_fields;
    cache_get_data(num_rows,num_fields,Handle);
    SetPlayerVirtualWorld(playerid,1);
    if(num_rows == 0)
    {
    //reg
    ClearChat(playerid);
    ShowPlayerDialog(DIALOG_REGISTER),DIALOG_STYLE_PASSWORD,"Neuanfang","Herzlich Willkommen auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");
    }
    else
    {
    //log
    ClearChat(playerid);
    ShowPlayerDialog(DIALOG_REGISTER),DIALOG_STYLE_PASSWORD,"Einloggen","Herzlich Willkommen Zurück auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");
    }
    return 1;
    }
















    //Anderes
    stock Spielername(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    return name;
    }



    stock ClearChat(playerid)
    {
    for (new i= 0;i<100;i++)
    {
    SendClientMessage(playerid,weiß,"");
    }
    return 1;
    }



  • ShowPlayerDialog(DIALOG_REGISTER),DIALOG_STYLE_PASSWORD,"Neuanfang","Herzlich Willkommen auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");
    zu:
    ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Neuanfang","Herzlich Willkommen auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");


    ShowPlayerDialog(DIALOG_REGISTER),DIALOG_STYLE_PASSWORD,"Einloggen","Herzlich Willkommen Zurück auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");
    zu:
    ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Einloggen","Herzlich Willkommen Zurück auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");



    TogglePlayerSpectating(playerid,1);
    Um ein Leerzeichen auf die gleiche Höhe wie ClearChat(playerid); setzen, sprich:
    ClearChat(playerid);
    TogglePlayerSpectating(playerid,1);
    zu:
    ClearChat(playerid);
    TogglePlayerSpectating(playerid,1);

  • Beitrag von ShadowKev1999 ()

    Dieser Beitrag wurde von Eddy aus folgendem Grund gelöscht: Spam ().
  • Beitrag von Spe4klezZ ()

    Dieser Beitrag wurde vom Autor gelöscht ().
  • habe neue fehler das ich nicht hinbekommen
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutorial.pwn(215) : error 017: undefined symbol "kick"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutorial.pwn(217) : error 017: undefined symbol "stlin"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutorial.pwn(222) : error 001: expected token: ";", but found "}"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutorial.pwn(223) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




    3 Errors.



    mein script:

    #include <a_samp>
    #include <a_mysql>
    #include <md5>
    //Mysql Daten
    #define MYSQL_HOST "127.0.0.1"
    #define MYSQL_USER "root"
    #define MYSQL_DATA "tut"
    #define MYSQL_PASS ""
    new Handle;
    //playerinfo
    enum playerInfo{
    db_id,
    pEingeloggt,
    pNeuling,
    pAlter,
    pGeschlecht,
    pSkin,
    Float:pRussi,
    Float:pLeben
    };
    new pInfo[MAX_PLAYERS][playerInfo];





    //Dialoge
    #define DIALOG_REGISTER 1
    #define DIALOG_CHAR1 2
    #define DIALOG_CHAR2 3
    #define DIALOG_CHAR3 4
    #define DIALOG_LOGIN 5
    //Farben
    #define gelb 0xFFFA00FF
    #define weiß 0xFAFAFAFF
    main()
    {
    print("\n----------------------------------");
    print(" [GRG]testserver");
    print("----------------------------------\n");
    }
    public OnGameModeInit()
    {
    //Gamemode



    SetGameModeText("[GRG] testserver");



    //Mysql Verbindung



    Handle=mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_DATA,MYSQL_PASS);
    if(mysql_errno() < 1)print("MYSQL: Die Verbindung wurde Erfolgreich hergestellt."),
    mysql_log(LOG_ALL);else print ("MYSQL: Die Verbindung zum mysql Server konnte nicht hergestellt werden. | Server wird heruntergefahren.");
    return 1;
    }
    public OnGameModeExit()
    {
    return 1;
    }
    public OnPlayerRequestClass(playerid, classid)
    {
    SetSpawnInfo(playerid,0,0,0,0,0,0,0,0,0,0,0,0);
    SpawnPlayer(playerid);



    return 1;
    }
    forward CheckUser(playerid);
    public CheckUser(playerid)
    {
    new query[256];
    mysql_format(Handle, query, sizeof(query),"SELECT * FROM user WHERE Username='%e'",Spielername(playerid));
    mysql_tquery(Handle,query,"UserCheck","i",playerid);
    ClearChat(playerid);
    TogglePlayerSpectating(playerid,1);
    return 1;
    }
    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }
    public OnPlayerSpawn(playerid)
    {
    ClearChat(playerid);
    SendClientMessage(playerid,gelb,"es Halt: Willkommen Auf LS-Airport wir wünschen ihnen einem schönen aufenhalt");
    SetPlayerPos(playerid,1614.8796,-2333.6069,13.5469);
    SetPlayerFacingAngle(playerid,1.0462);
    return 1;
    }
    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }
    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }
    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }
    public OnPlayerText(playerid, text[])
    {
    return 1;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/hilfe", cmdtext, true, 10) == 0)
    {
    //die Befehle kommen noch
    return 1;
    }
    return 0;
    }
    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }
    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }
    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }
    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }
    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }
    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }
    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }
    public OnRconCommand(cmd[])
    {
    return 1;
    }
    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }
    public OnObjectMoved(objectid)
    {
    return 1;
    }
    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }
    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }
    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }
    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }
    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }
    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }
    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }
    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }
    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }
    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }
    public OnPlayerUpdate(playerid)
    {
    return 1;
    }
    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }
    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }
    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }
    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_REGISTER)
    {
    if(!response)return kick(playerid);
    SetPVarString(playerid,"passwortvar",inputtext);
    if(stlin(inouttext) >=4)
    {
    ShowPlayerDialog(playerid,DIALOG_CHAR1,DIALOG_STYLE_MSGBOX,"Charackter 1/3","Welche Geschlecht bist du?","Männlich","Weiblich")




    }
    else
    {
    ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Neuanfang","Herzlich Willkommen \n{FF0000}Fehler:Eingabe ist Falsch\n auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");




    }
    }
    if(dialogid == DIALOG_CHAR1)
    {
    if(response)
    {
    //männ
    pInfo[playerid][pGeschlecht]=1;
    ShowPlayerDialog(playerid,DIALOG_CHAR2,DIALOG_STYLE_LIST,"Charackter 2/3","hat du die Regeln gelesen?\nJa\nNein\nWas es gibt Regeln?","Weiter","Abbrechen");
    }
    else
    {
    //weib
    pInfo[playerid][pGeschlecht]=2;
    ShowPlayerDialog(playerid,DIALOG_CHAR2,DIALOG_STYLE_LIST,"Charackter 2/3","hat du die Regeln gelesen?\nJa\nNein\nWas es gibt Regeln?","Weiter","Abbrechen");
    }
    }
    if(dialogid == DIALOG_CHAR2)
    {
    if(response)
    {

    }
    else
    {Kick(playerid);}




    }
    return 1;
    }
    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }
    //MYSQL Datenbanken Irgenwas
    forward UserCheck(playerid);
    public UserCheck(playerid)
    {
    new num_rows, num_fields;
    cache_get_data(num_rows,num_fields,Handle);
    SetPlayerVirtualWorld(playerid,1);
    if(num_rows == 0)
    {
    //reg
    ClearChat(playerid);
    ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Neuanfang","Herzlich Willkommen auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");




    }
    else
    {
    //log
    ClearChat(playerid);
    ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Einloggen","Herzlich Willkommen Zurück auf GRG server Bitte gebe dein gewünchtes password ein.","Weiter","Abrechen");





    }
    return 1;
    }






    //Anderes
    stock Spielername(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    return name;
    }
    stock ClearChat(playerid)
    {
    for (new i= 0;i<100;i++)
    {
    SendClientMessage(playerid,weiß,"");
    }
    return 1;
    }

  • Du musst auf die richtige Schreibweise achten und auch auf Groß/Klein.


    Mach aus kick(playerid); -> Kick(playerid);


    Desweiteren if(stlin(inouttext) >=4) zu if(strlen(inputtext) >=4)


    Edit:
    desweiteren fehlt bei 224 ein ; am Ende.
    ShowPlayerDialog(playerid,DIALOG_CHAR1,DIALOG_STYLE_MSGBOX,"Charackter 1/3","Welche Geschlecht bist du?","Männlich","Weiblich");

    „Auge um Auge - und die ganze Welt wird blind sein.“
    - Mahatma Gandhi

  • ich verstehe as nicht
    if(dialogid == DIALOG_CHAR2)
    {
    if(response)
    {

    }
    else



    {Kick(playerid);}




    }
    return 1;
    }
    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;[pwn]
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutorial.pwn(217) : error 017: undefined symbol "inouttext"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutorial.pwn(222) : error 001: expected token: ";", but found "}"
    C:\Users\kevin\Desktop\samp(KRP) server neu scripten 1\gamemodes\tutorial.pwn(223) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




    2 Errors.

    [/pwn]