Error mysql, mybb
#1

Hi, I have a problem with the map Roleplay by Casper, a map and started to play, everything works virtually the only fires up when I entered the password for the account of the global message pops up 'not found global! "I do not know why.

I pulled the code from the map, I think that corresponds to this message:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == LOGIN_EX)
   {
       if(!response) return Kick(playerid);
      new str[312];
      new hashex[256];
      new salt[126];
      new players[126];
      new zmienna;
      format(str, sizeof(str), "SELECT mybb_users.username, mybb_users.salt, 1players.guid FROM 1players JOIN mybb_users ON mybb_users.uid = 1players.guid WHERE mybb_users.username = '%s'", NickSamp(playerid));
       mysql_query(str);
       mysql_store_result();
       if(mysql_num_rows())
       {
         mysql_fetch_row_format(str);
           sscanf(str, "p<|>s[126]s[126]d",
           PlayerInfo[playerid][globname],
         salt,
         PlayerInfo[playerid][guid]);
           mysql_free_result();
       }
       else
       {
           GameTextForPlayer(playerid, "~n~~n~~n~~n~~r~Nie znaleziono globala!", 5000, 5);
           ShowPlayerDialog(playerid, LOGIN_EX, DIALOG_STYLE_INPUT, "{FFFFFF}"servname" » {008000}Logowanie", TEXT_LOGIN, "Zaloguj", "Wyjdź");
           mysql_free_result();
           return 1;
       }
       format(hashex, sizeof(hashex), "%s%s", MD5_Hash(salt), MD5_Hash(inputtext));
       format(str, sizeof(str), "SELECT 1players.nick, 1players.guid, 1players.player_uid, 1players.hours, 1players.minutes FROM 1players JOIN mybb_users ON mybb_users.password = md5('%s') WHERE 1players.guid = %d", hashex, PlayerInfo[playerid][guid]);
       mysql_query(str);
         mysql_store_result();
       if(mysql_num_rows())
       {
         if(GetPVarInt(playerid, "AFK") == 1) return OnPlayerLoginIc(playerid, PlayerInfo[playerid][player_uid]);
            while(mysql_fetch_row_format(str, "|"))
            {
                zmienna++;
                sscanf(str, "p<|>s[32]dddd",
            PlayerInfo[playerid][nick],
            PlayerInfo[playerid][guid],
            PlayerInfo[playerid][player_uid],
            PlayerInfo[playerid][hours],
            PlayerInfo[playerid][minutes]);
            UnderscoreToSpace(PlayerInfo[playerid][nick]);
               format(players, sizeof(players), "%s%d\t%s%dh %dmin\n", players, PlayerInfo[playerid][player_uid], name_add_tabs(PlayerInfo[playerid][nick]), PlayerInfo[playerid][hours], PlayerInfo[playerid][minutes]);
            }
         if(zmienna != 0) ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_LIST, "{FFFFFF}"servname" » {008000}Logowanie", players, "Wybierz", "");
         else
         {
            ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_MSGBOX, "{FFFFFF}"servname" » {008000}Logowanie", "Nie posiadasz żadnej postaci,\nmożesz założyć ją w panelu gracza\nna forum!", "Zaloguj", "Wyjdź");
             Kick(playerid);
         }
       }
       else
       {
         GameTextForPlayer(playerid, "~n~~n~~n~~r~~h~Podales bledne haslo!",5000,5);
           ShowPlayerDialog(playerid, LOGIN_EX, DIALOG_STYLE_INPUT, "{FFFFFF}"servname" » {008000}Logowanie", TEXT_LOGIN, "Zaloguj", "Wyjdź");
       }
      mysql_free_result();
   }
Код:
Wystąpiły następujące problemy:
Warning [2] mysqli_num_rows() expects parameter 1 to be mysqli_result, null given - Line: 468 - File: inc/db_mysqli.php PHP 5.2.17 (Linux)
File    Line    Function
[PHP]         errorHandler->error
/inc/db_mysqli.php    468    mysqli_num_rows
/gamecp.php
Edit2: I downloaded and installed the plug-in v2.0 but still the problem here is logshttp://wklej.to/Jan9d
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)