Mysql Problem ( cache_insert_id )
#6

i think problem can be here ( in registration dialog )

PHP код:
Dialog_Register(playeridresponsepasswordtext[])
{
    new 
file[100], Name[MAX_PLAYER_NAME]; // Setup local variables
    
GetPlayerName(playeridNamesizeof(Name)); // Get the playername
    
format(filesizeof(file), PlayerFileName); // Construct the complete filename for this player's account
    
switch (response// Check which button was clicked
    
{
        case 
1// Player clicked "Register"
        
{
            
// Check if the player entered a password
            
if(strlen(passwordtext) > 0)
            {
                new 
query[300];
                
// mysql_format(g_iHandle, query, sizeof(query), "INSERT INTO `users` (`PlayerName`, `Password`) VALUES ('%e', '%s')", GetPlayerNameEx(playerid), passwordtext);
                
mysql_format(g_iHandlequerysizeof(query), "INSERT INTO `users` (`PlayerName`, `Password`, `email`) VALUES ('%e', '%s', '%s')"GetPlayerNameEx(playerid), passwordtextAPlayerData[playerid][Email]);
                
mysql_tquery(g_iHandlequery"""i"playerid);
                
                
// Send a message to the client to inform him that his account has been registered
                
SendClientMessage(playerid0xFFFFFFFFTXT_AccountRegistered);
                
APlayerData[playerid][LoggedIn] = true// The player has logged in properly
            
}
            else
            {
                
SendClientMessage(playerid0xFFFFFFFFTXT_WrongPassword);
                
KickEx(playerid);
            }
        }
        case 
0// Player clicked "Cancel"
        
{
            
// Show a message that the player must be registered to play on this server
            
SendClientMessage(playerid0xFFFFFFFFTXT_PlayerMustRegister);
            
// Kick the player
            
KickEx(playerid);
        }
    }
    return 
1;

EDIT :

i didn't use "PlayerFile_Create" anywhere.
Reply


Messages In This Thread
Mysql Problem ( cache_insert_id ) - by AlexBlack - 14.05.2015, 10:23
Re: Mysql Problem ( cache_insert_id ) - by Konstantinos - 14.05.2015, 10:25
Re : Mysql Problem ( cache_insert_id ) - by AlexBlack - 14.05.2015, 10:38
Re: Mysql Problem ( cache_insert_id ) - by Konstantinos - 14.05.2015, 10:42
Re : Re: Mysql Problem ( cache_insert_id ) - by AlexBlack - 14.05.2015, 10:46
Re : Mysql Problem ( cache_insert_id ) - by AlexBlack - 14.05.2015, 10:51
Re: Mysql Problem ( cache_insert_id ) - by Konstantinos - 14.05.2015, 10:54

Forum Jump:


Users browsing this thread: 1 Guest(s)