[Ajuda] Meu login MySql nгo carrega as contas
#1

@Delete
Reply
#2

Fez debug ?
Reply
#3

Exemplo para fazer um Debug

Procure pela stock Login e coloque os print se algum falhar vc encontrara o bug!
pawn Код:
stock Login(playerid)
{
     print("0000000000000");
        new query[128], string[64], money, score;
        format(query, sizeof(query), "SELECT * FROM accounts WHERE user = '%s'", Name(playerid));
 print("11111111111");
        mysql_query(query);
  print("2222222222222222");
      mysql_store_result();
print("33333333333333333");  
      while(mysql_fetch_row_format(query))
        {
            mysql_fetch_field_row(string, "admin"); PlayerInfo[playerid][pAdmin] = strval(string);
          print("4444444444444");
  mysql_fetch_field_row(string, "VIP"); PlayerInfo[playerid][pVIP] = strval(string);
print("55555555555555");
            mysql_fetch_field_row(string, "warnings"); PlayerInfo[playerid][pWarnings] = strval(string);
print("6666666666666");
            mysql_fetch_field_row(string, "score"); score = strval(string);
print("77777777777777777");
            mysql_fetch_field_row(string, "money"); money = strval(string);
print("8888888888888");
            mysql_fetch_field_row(string, "kills"); PlayerInfo[playerid][pKills] = strval(string);
print("999999999999999");
            mysql_fetch_field_row(string, "deaths"); PlayerInfo[playerid][pDeaths] = strval(string);
print("aaaaaaaaaaaaaaaaaa");
                mysql_fetch_field_row(string, "points"); PlayerInfo[playerid][pPoints] = strval(string);
        }
    print("bbbbbbbbbbbbbbbbb");  
  mysql_free_result();
        GivePlayerMoney(playerid, money);
    print("ccccccccccccc");
    SetPlayerScore(playerid, score);
print("dddddddddddddddddd");
        PlayerInfo[playerid][pLogged] = 1;
print("eeeeeeeeeeee");
        UpdateStatsTextdraw(playerid);
print("ffffffffffffff");
        SendClientMessage(playerid, C_LGREEN, "ACCOUNT: Successfully logged in.");
print("ggggggggggggggggggggg");
        return 1;
}
Reply
#4

Exemplo para fazer um Debug

Procure pela stock Login e coloque os print se algum falhar vc encontrara o bug!
pawn Код:
stock Login(playerid)
{
     print("0000000000000");
        new query[128], string[64], money, score;
        format(query, sizeof(query), "SELECT * FROM accounts WHERE user = '%s'", Name(playerid));
 print("11111111111");
        mysql_query(query);
  print("2222222222222222");
      mysql_store_result();
print("33333333333333333");  
      while(mysql_fetch_row_format(query))
        {
            mysql_fetch_field_row(string, "admin"); PlayerInfo[playerid][pAdmin] = strval(string);
          print("4444444444444");
  mysql_fetch_field_row(string, "VIP"); PlayerInfo[playerid][pVIP] = strval(string);
print("55555555555555");
            mysql_fetch_field_row(string, "warnings"); PlayerInfo[playerid][pWarnings] = strval(string);
print("6666666666666");
            mysql_fetch_field_row(string, "score"); score = strval(string);
print("77777777777777777");
            mysql_fetch_field_row(string, "money"); money = strval(string);
print("8888888888888");
            mysql_fetch_field_row(string, "kills"); PlayerInfo[playerid][pKills] = strval(string);
print("999999999999999");
            mysql_fetch_field_row(string, "deaths"); PlayerInfo[playerid][pDeaths] = strval(string);
print("aaaaaaaaaaaaaaaaaa");
                mysql_fetch_field_row(string, "points"); PlayerInfo[playerid][pPoints] = strval(string);
        }
    print("bbbbbbbbbbbbbbbbb");  
  mysql_free_result();
        GivePlayerMoney(playerid, money);
    print("ccccccccccccc");
    SetPlayerScore(playerid, score);
print("dddddddddddddddddd");
        PlayerInfo[playerid][pLogged] = 1;
print("eeeeeeeeeeee");
        UpdateStatsTextdraw(playerid);
print("ffffffffffffff");
        SendClientMessage(playerid, C_LGREEN, "ACCOUNT: Successfully logged in.");
print("ggggggggggggggggggggg");
        return 1;
}
Reply
#5

Quote:
Originally Posted by Schocc
Посмотреть сообщение
Exemplo para fazer um Debug

Procure pela stock Login e coloque os print se algum falhar vc encontrara o bug!
pawn Код:
stock Login(playerid)
{
     print("0000000000000");
        new query[128], string[64], money, score;
        format(query, sizeof(query), "SELECT * FROM accounts WHERE user = '%s'", Name(playerid));
 print("11111111111");
        mysql_query(query);
  print("2222222222222222");
      mysql_store_result();
print("33333333333333333");  
      while(mysql_fetch_row_format(query))
        {
            mysql_fetch_field_row(string, "admin"); PlayerInfo[playerid][pAdmin] = strval(string);
          print("4444444444444");
  mysql_fetch_field_row(string, "VIP"); PlayerInfo[playerid][pVIP] = strval(string);
print("55555555555555");
            mysql_fetch_field_row(string, "warnings"); PlayerInfo[playerid][pWarnings] = strval(string);
print("6666666666666");
            mysql_fetch_field_row(string, "score"); score = strval(string);
print("77777777777777777");
            mysql_fetch_field_row(string, "money"); money = strval(string);
print("8888888888888");
            mysql_fetch_field_row(string, "kills"); PlayerInfo[playerid][pKills] = strval(string);
print("999999999999999");
            mysql_fetch_field_row(string, "deaths"); PlayerInfo[playerid][pDeaths] = strval(string);
print("aaaaaaaaaaaaaaaaaa");
                mysql_fetch_field_row(string, "points"); PlayerInfo[playerid][pPoints] = strval(string);
        }
    print("bbbbbbbbbbbbbbbbb");  
  mysql_free_result();
        GivePlayerMoney(playerid, money);
    print("ccccccccccccc");
    SetPlayerScore(playerid, score);
print("dddddddddddddddddd");
        PlayerInfo[playerid][pLogged] = 1;
print("eeeeeeeeeeee");
        UpdateStatsTextdraw(playerid);
print("ffffffffffffff");
        SendClientMessage(playerid, C_LGREEN, "ACCOUNT: Successfully logged in.");
print("ggggggggggggggggggggg");
        return 1;
}
Acabei de mandar um tutorial de como fazer debug para ele,
se ele nгo achar o tutorial й porque ele й lesado ou cego.

Ah, seu debug estб errado.
Reply
#6

Entгo.. nгo apareceu esses ,,, alguem tem ideia do que pode ser?
pawn Код:
if(rows == 1)
                {
                    Login(playerid);
                }
                if(!rows)
                {
                    new string[150];
                    format(string, sizeof(string), "{FFFFFF}Olб {00AAFF}%s{FFFFFF}! Este nome ja esta registrado.\n{FF0000}Por favor insira sua senha:", Name(playerid));
                    ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "Logar", string, "Logar", "Sair");
                }
Reply
#7

Na hуra de logar Nгo mostrou 11111? e O server Desligou ou continuou dps do spawn?
Reply
#8

Quote:
Originally Posted by Schocc
Посмотреть сообщение
Na hуra de logar Nгo mostrou 11111? e O server Desligou ou continuou dps do spawn?
Aparece a Dialog do login e loga com qualquer senha

mais nao carrega nenhum dado da conta tambem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)