MYSQL problem

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
  • Diese Error's kommen:
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(95) : error 010: invalid function or declaration
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(295) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(301) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(342) : error 030: compound statement not closed at the end of file (started at line 285)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    4 Errors.


    Zeilen:
    Zeile: 95
    [pawn]public OnUserCheck(playerid)
    {
    new num_rows,num_fields;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==0)
    {
    //Registrierung
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Regstrierung","Gib bitte dein gewünschtes Passwort an:","OK","Abbrechen");
    }
    else
    //Login
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login Vorgang","Gib bitte dein Passwort ein:","OK","Abbrechen");
    }
    return 1;
    }
    [/pawn]



    Zeile: 295-342


    [pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid==DIALOG_LOGIN)
    {
    if(response)
    {
    new name[MAX_PLAYER_NAME],query[128],passwort[25];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>0)
    {
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"SELECT * FROM user WHERE username:'%s' AND password='%s'",name,passwort);
    mysql_function_query(dbhandle,query,true,"OnPasswordResponse","i",playerid);
    {
    else
    {
    SendClientMessage(playerid,Rot,"Gib bitte dein Passwort ein!");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login Vorgang","Gib bitte dein Passwort ein:","OK","Abbrechen");
    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }
    if(dialogid==DIALOG_REGISTER)
    {
    if(response)
    {
    //new name[MAX_PLAYER_NAME],query[128],passwort[25];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>4)
    {
    //registrierungsfunktion
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"INSERT INTO user (username,password) VALUES ('%s','%s' ",name,passwort);
    mysql_function_query(dbhandle,query,false,"","");
    }
    else
    {
    //kleiner als 3Zeichen
    SendClientMessage(playerid,Rot,"Dein Passwort muss mindenstens 5 Zeichen haben!");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Regstrierung","Gib bitte dein gewünschtes Passwort an:","OK","Abbrechen");

    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }
    return 1;
    }


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


  • if(strlen(inputtext)>0)
    {
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"SELECT * FROM user WHERE username:'%s' AND password='%s'",name,passwort);
    mysql_function_query(dbhandle,query,true,"OnPasswordResponse","i",playerid);
    {

    zu

    if(strlen(inputtext)>0)
    {
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"SELECT * FROM user WHERE username:'%s' AND password='%s'",name,passwort);
    mysql_function_query(dbhandle,query,true,"OnPasswordResponse","i",playerid);
    }

  • Dann kommen immernoch die Error's :
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(95) : error 010: invalid function or declaration
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(295) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(301) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\Neuer Ordner\gamemodes\Kevin.pwn(342) : error 030: compound statement not closed at the end of file (started at line 285)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.