Beiträge von Maurice.

    Zeile (248) : warning 219: local variable "Name" shadows a variable at a preceding level


    0 Errors, 1 Warnungen
    Kompilierung erfolgreich


    PWNMod Compiler Version 1.2
    (c) Trooper[Y]
    In Kooperation mit GTA-Servers.de


    stock Name(playerid)
    {
    new Name[44]; //HIER DER WARNING
    GetPlayerName(playerid,Name,sizeof(Name));
    return Name;
    }


    Hallo,


    hier die Zeilen:


    public OnPlayerConnect(playerid)
    {
    new string[50];
    format(string,sizeof(string),"{} %s hat den Server betreten!",Name);
    return 1;
    }


    stock Name(playerid)
    {
    new Name[24];
    GetPlayerName(playerid,Name,sizeof(Name));
    return Name;
    }

    stock mysql_CheckAccount(playerid)
    {
    new Query[128],Name[MAX_PLAYER_NAME],count;
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    mysql_real_escape_string(Name, Name);
    format(Query, sizeof(Query), "SELECT * FROM `accounts` WHERE `Name` = '%s'", Name);
    mysql_query(Query);
    mysql_store_result();
    count = mysql_num_rows();
    mysql_free_result();
    return count;
    }


    stock CreateAccount(playerid, pass[])
    {
    new query[256],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    mysql_real_escape_string(Name,Name);
    mysql_real_escape_string(pass,pass);
    format(query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Passwort`) VALUES ('%s', '%s')", Name, pass);
    mysql_query(query);
    return true;
    }


    stock mysql_ReturnPasswort(Name[])
    {
    new query[130], Get[130];
    mysql_real_escape_string(Name, Name);
    format(query, 128, "SELECT `passwort` FROM `accounts` WHERE `Name` = '%s'", Name);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(Get);
    mysql_free_result();
    return Get;
    }


    findet ihr hier fehler?


    Kann es sein das es daran liegt das es keine tabelle erstellt wird :D =?

    Passt alles nun aber wenn ich connectem erscheint kein Textdraw:new PlayerText:RegisterT[MAX_PLAYERS];
    new PlayerText:LoginT[MAX_PLAYERS];


    public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
    {
    if(_:playertextid != INVALID_TEXT_DRAW)
    {
    if(playertextid == LoginT[playerid])
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte gib dein Passwort ein:","Login","Abbrechen");
    PlayerTextDrawHide(playerid,LoginT[playerid]);
    }
    else if(playertextid == RegisterT[playerid])
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Bitte Gib ein Passwort an:","Register","Exit");
    PlayerTextDrawHide(playerid,RegisterT[playerid]);
    }
    /*CancelSelectTextDraw(playerid); //Schließt den TD (Abbrechen) CancelSelectTextDraw = zu deutsch SchließeAusgewähltenTextdraw
    }
    PlayerTextDrawHide(playerid,ConnectT2[playerid]);
    PlayerTextDrawHide(playerid,ConnectT1[playerid]);
    PlayerTextDrawHide(playerid,RegisterT[playerid]);
    PlayerTextDrawHide(playerid,LoginT[playerid]);
    CancelSelectTextDraw(playerid);
    }*/
    }
    return 1;
    }
    public OnPlayerConnect(playerid)
    {
    RegisterT[playerid] = CreatePlayerTextDraw(playerid, 226.875000, 208.250000, "Beginne ein Neues Leben!");
    PlayerTextDrawLetterSize(playerid, RegisterT[playerid], 0.449999, 1.600000);
    PlayerTextDrawAlignment(playerid, RegisterT[playerid], 1);
    PlayerTextDrawColor(playerid, RegisterT[playerid], 255);
    PlayerTextDrawSetShadow(playerid, RegisterT[playerid], 0);
    PlayerTextDrawSetOutline(playerid, RegisterT[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, RegisterT[playerid], 51);
    PlayerTextDrawFont(playerid, RegisterT[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, ConnectT2[playerid], true);
    PlayerTextDrawSetProportional(playerid, RegisterT[playerid], 1);


    LoginT[playerid] = CreatePlayerTextDraw(playerid, 226.875000, 208.250000, "Logge dich in dein Leben ein!");
    PlayerTextDrawLetterSize(playerid, LoginT[playerid], 0.449999, 1.600000);
    PlayerTextDrawAlignment(playerid, LoginT[playerid], 1);
    PlayerTextDrawColor(playerid, LoginT[playerid], 255);
    PlayerTextDrawSetShadow(playerid, LoginT[playerid], 0);
    PlayerTextDrawSetOutline(playerid, LoginT[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, LoginT[playerid], 51);
    PlayerTextDrawFont(playerid, LoginT[playerid], 1);
    PlayerTextDrawSetProportional(playerid, LoginT[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, ConnectT2[playerid], true);


    if(mysql_CheckAccount(playerid) == 0)
    {
    PlayerTextDrawShow(playerid,ConnectT2[playerid]);
    PlayerTextDrawShow(playerid,ConnectT1[playerid]);
    PlayerTextDrawShow(playerid,RegisterT[playerid]);
    //ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Bitte Gib ein Passwort an:","Register","Exit");
    }
    else if(mysql_CheckAccount(playerid) == 1)
    {
    PlayerTextDrawShow(playerid,ConnectT2[playerid]);
    PlayerTextDrawShow(playerid,ConnectT1[playerid]);
    PlayerTextDrawShow(playerid,LoginT[playerid]);
    //ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte gib dein Passwort ein:","Login","Abbrechen");
    }
    return 1;
    }

    C:\Dokumente und Einstellungen\Meiner\Desktop\New Samp Project\gamemodes\NSP.pwn(150) : error 033: array must be indexed (variable "LoginT")
    C:\Dokumente und Einstellungen\Meiner\Desktop\New Samp Project\gamemodes\NSP.pwn(153) : error 033: array must be indexed (variable "RegisterT")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    jetzt ist es so: if(clickedid == LoginT)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte gib dein Passwort ein:","Login","Abbrechen"); }
    else if(clickedid == RegisterT)
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Bitte Gib ein Passwort an:","Register","Exit");
    }

    Hallo,


    ich habe 2 Warnings: C:\Dokumente und Einstellungen\Meiner\Desktop\New Samp Project\gamemodes\NSP.pwn(150) : warning 213: tag mismatch
    C:\Dokumente und Einstellungen\Meiner\Desktop\New Samp Project\gamemodes\NSP.pwn(153) : warning 213: tag mismatch
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Warnings.


    Hier der code
    public OnPlayerClickTextDraw(playerid, Text:clickedid)
    {
    if(_:clickedid != INVALID_TEXT_DRAW)
    {
    if(clickedid == LoginT[playerid]) // 1 Warning
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte gib dein Passwort ein:","Login","Abbrechen"); }
    else if(clickedid == RegisterT[playerid]) // 2 Warning
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Bitte Gib ein Passwort an:","Register","Exit");
    }
    /*CancelSelectTextDraw(playerid);
    }
    PlayerTextDrawHide(playerid,ConnectT2[playerid]);
    PlayerTextDrawHide(playerid,ConnectT1[playerid]);
    PlayerTextDrawHide(playerid,RegisterT[playerid]);
    PlayerTextDrawHide(playerid,LoginT[playerid]);
    CancelSelectTextDraw(playerid);
    }*/
    }
    return 1;
    }

    Hallo,


    seit dem ich oben im Script Host, User usw.. eingegeben habe lädt der Server nicht weiter als die Filterscripte:


    ----------
    Loaded log file: "server_log.txt".
    ----------


    SA-MP Dedicated Server
    ----------------------
    v0.3x, (C)2005-2013 SA-MP Team


    [21:18:40] filterscripts = "" (string)
    [21:18:40]
    [21:18:40] Server Plugins
    [21:18:40] --------------
    [21:18:40] Loading plugin: mysql.dll
    [21:18:41]


    > MySQL plugin R5 successfully loaded.


    [21:18:41] Loaded.
    [21:18:41] Loading plugin: nativechecker.dll
    [21:18:41] Loaded.
    [21:18:41] Loaded 2 plugins.


    [21:18:41]
    [21:18:41] Filterscripts
    [21:18:41] ---------------
    [21:18:41] Loaded 0 filterscripts.


    Script Teil:
    #define Host "dsdsdsadet:3306"
    #define User "elta1234"
    #define Datenbank "el***a1234"
    #define Password "el***4"


    stock MYSQL_SERVER_CONNECT()
    {
    mysql_connect(Host,User,Datenbank,Password);
    if(mysql_ping() == 1) {
    print("--- | :=) | Es konnte eine Verbindung zum MySQL Server hergestellt werden. -----");
    }
    else {
    print("--- |ERROR| ----- Der MySQL ist nicht mit den Server verbunden -------");
    print("----------------- Vielleicht ist der MySQL Server down ----------------");
    }

    return 1;
    }

    SA-MP Dedicated Server
    ----------------------
    v0.3x, (C)2005-2013 SA-MP Team


    [20:14:33] filterscripts = "" (string)
    [20:14:33]
    [20:14:33] Server Plugins
    [20:14:33] --------------
    [20:14:33] Loading plugin: mysql.dll
    [20:14:33] >> plugin.mysql: running on 1 thread.
    [20:14:33] >> plugin.mysql: R31 successfully loaded.
    [20:14:33] Loaded.
    [20:14:33] Loading plugin: nativechecker.dll
    [20:14:33] Loaded.
    [20:14:33] Loaded 2 plugins.


    [20:14:33]
    [20:14:33] Filterscripts
    [20:14:33] ---------------
    [20:14:33] Loaded 0 filterscripts.


    [20:14:33] Error: Function not registered: 'mysql_ping'
    [20:14:33] Error: Function not registered: 'mysql_real_escape_string'
    [20:14:33] Error: Function not registered: 'mysql_query'
    [20:14:33] Error: Function not registered: 'mysql_store_result'
    [20:14:33] Error: Function not registered: 'mysql_num_rows'
    [20:14:33] Error: Function not registered: 'mysql_free_result'
    [20:14:33] Error: Function not registered: 'mysql_fetch_row_format'
    [20:14:33] Error: Function not registered: 'mysql_fetch_int'
    [20:14:33] Script[gamemodes/NSP.amx]: Run time error 19: "File or function is not found"
    [20:14:33] Number of vehicle models: 0
    [20:14:38] --- Server Shutting Down.
    [20:14:38] plugin.mysql: Unloading plugin...
    [20:14:38] plugin.mysql: Plugin unloaded.


    liegt es an den include von mysql ?

    Hallo,


    hier die meldungen:



    Server_log.txt



    ----------
    Loaded log file: "server_log.txt".
    ----------


    SA-MP Dedicated Server
    ----------------------
    v0.3x, (C)2005-2013 SA-MP Team


    [20:04:38] filterscripts = "" (string)
    [20:04:38]
    [20:04:38] Server Plugins
    [20:04:38] --------------
    [20:04:38] Loading plugin: mysql.dll
    [20:04:38] >> plugin.mysql: running on 1 thread.
    [20:04:38] >> plugin.mysql: R31 successfully loaded.
    [20:04:38] Loaded.
    [20:04:38] Loaded 1 plugins.


    [20:04:38]
    [20:04:38] Filterscripts
    [20:04:38] ---------------
    [20:04:38] Loaded 0 filterscripts.


    [20:04:38] Script[gamemodes/NSP.amx]: Run time error 19: "File or function is not found"
    [20:04:38] Number of vehicle models: 0
    [20:04:42] --- Server Shutting Down.
    [20:04:42] plugin.mysql: Unloading plugin...
    [20:04:42] plugin.mysql: Plugin unloaded.


    Server.cfg
    echo Executing Server Config...
    lanmode 0
    rcon_password 123
    maxplayers 50
    port 7777
    hostname SA-MP 0.3 Server
    gamemode0 NSP
    filterscripts
    announce 0
    plugins mysql.dll
    query 1
    chatlogging 0
    weburl www.sa-mp.com
    onfoot_rate 40
    incar_rate 40
    weapon_rate 40
    stream_distance 300.0
    stream_rate 1000
    maxnpc 0
    logtimeformat [%H:%M:%S]


    Ich glaube es ist das MySQL R7 plugin