MySQL Error Help :(
#6

Here you have:
PHP код:
public OnPlayerDataLoaded(playerid)
{
    if(!
cache_get_row_count(DBConnect))
    {
        
ShowPlayerDialog(playeridDialog_NoAcctDIALOG_STYLE_MSGBOX"Not Registerd on UCP, register there first.""ok","");
        
Kick(playerid);
    }
    else
    {
        
cache_get_field_content(0"Pass"PlayerInfo[playerid][pPass], DBConnect1024); // Why 1024 characters?!
        
PlayerInfo[playerid][pID] = cache_get_field_content_int(0"ID"DBConnect);
        
ShowPlayerDialog(playeridDialog_LoginDIALOG_STYLE_INPUT"login""enter password to login""login""quit");
    }
    return 
1;

You should update to the latest version by the way, those functions are from the R33 one. In case of you update your plugin the callback would look like this:
PHP код:
public OnPlayerDataLoaded(playerid)
{
    new 
rows;
    if(
cache_get_row_count(rows))
    {
        if(!
rows)
        {
            
ShowPlayerDialog(playeridDialog_NoAcctDIALOG_STYLE_MSGBOX"Not Registerd on UCP, register there first.""ok","");
            
Kick(playerid);
        }
        else
        {
            
cache_get_value_name(0"Pass"PlayerInfo[playerid][pPass], 1024); // Why 1024 characters?!
            
cache_get_value_name_int(0"ID"PlayerInfo[playerid][pID]);
            
ShowPlayerDialog(playeridDialog_LoginDIALOG_STYLE_INPUT"login""enter password to login""login""quit");
        }
    }
    return 
1;

You might follow the next tutorial in order to update your MySQL plugin: https://sampforum.blast.hk/showthread.php?tid=644891
Reply


Messages In This Thread
MySQL Error Help :( - by GeorgeMcReary - 13.12.2017, 14:37
Re: MySQL Error Help :( - by RogueDrifter - 13.12.2017, 17:44
Re: MySQL Error Help :( - by Xeon™ - 13.12.2017, 17:50
Re: MySQL Error Help :( - by GeorgeMcReary - 14.12.2017, 16:42
Re: MySQL Error Help :( - by GeorgeMcReary - 16.12.2017, 13:35
Re: MySQL Error Help :( - by RIDE2DAY - 16.12.2017, 14:11
Re: MySQL Error Help :( - by GeorgeMcReary - 17.12.2017, 07:12
Re: MySQL Error Help :( - by GeorgeMcReary - 24.12.2017, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)