[Ayuda] - Se borra la cuenta
#1
Holaa.. Tengo un problema.. En el sistema de r0ma .. No se si esto sera un error del plugin.. El problema es el siguiente.. Se crean una cuenta.. Anda perfecto todo.. Se guarda todo perfectamente.. Pero llega un momento en el cual la cuenta se borra.. Es decir ponen la cuenta y les dice "Este usuario no existe" .. Me fijo en la Base de Datos y aparece su cuenta anterior .. Alguna manera de solucionarlo? Gracias.
(15/12/2020, 07:06 PM)Mario AR. escribió: Cuando tu acatante conozca de tu nuevo puerto, te volverá a atacar
Responder
#2
A ver si entendí te dice q la cuenta no existe pero en la base de datos si esta? Pasa el conde con las modificaciones que hiciste
[TUT] Carnage

Fight

"El limite de los backdoors de gente q sabe programar como nostros lo impone nuestra maldad interior y creeme q soy muy malo en el interior"

Anónimo
Responder
#3
No modifique nada.. Solo le puse el guardado.. Lo que te mostre

Código PHP:
public guardar_datosid 
{
    new 
szQuery512 ], iData];
    
iData] = id;
    
iData] = GUARDAR_DATOS;
    
    
formatexszQuerycharsmaxszQuery ), 
    
"UPDATE %s SET Nivel='%d', Frags='%d', Infecciones='%d', Reset='%d', \
    Ammopacks='%d' ,H1='%d', H2='%d', H3='%d', H4='%d', H5='%d', Z1='%d', \
    Z2='%d', Z3='%d', Z4='%d', VN1='%d', VN2='%d', VN3='%d', CHUD1='%d', \
    CHUD2='%d', CHUD3='%d', CFlare1='%d', CFlare2='%d', CFlare3='%d', \
    PHUD1='%.2f', PHUD2='%.2f', PHumano='%d', PZombie='%d', GH='%d', \
    GZ='%d', CH='%d', CZ='%d', ARMAP='%d', \
    ARMAS='%d', ARMAA='%d' WHERE id='%d'"
,
    
szTable
    
g_nivel[id], 
    
g_frags[id],
    
g_infecciones[id],
    
g_reset[id],
    
g_ammopacks[id],
    
g_habilidades[id][0][0],
    
g_habilidades[id][0][1],
    
g_habilidades[id][0][2],
    
g_habilidades[id][0][3],
    
g_habilidades[id][0][4],
    
g_habilidades[id][1][0],
    
g_habilidades[id][1][1],
    
g_habilidades[id][1][2],
    
g_habilidades[id][1][3],
    
g_nvg[id][0],
    
g_nvg[id][1],
    
g_nvg[id][2],
    
g_hud[id][0],
    
g_hud[id][1],
    
g_hud[id][2],
    
g_flare_color[id][0],
    
g_flare_color[id][1],
    
g_flare_color[id][2],
    
g_hud_pos[id][0],
    
g_hud_pos[id][1],
    
g_puntos[id][0],
    
g_puntos[id][1],
    
g_gastados[id][0],
    
g_gastados[id][1],
    
g_humanclassnext[id],
    
g_zombieclassnext[id],
    
WPN_AUTO_PRI,
    
WPN_AUTO_SEC,
    
WPN_AUTO_ON,
    
g_idid ] );
    
SQL_ThreadQueryg_hTuple"DataHandler"szQueryiData);
}

public 
DataHandlerfailstateHandle:Queryerror[ ], error2data[ ], datasizeFloat:time ) {
    static 
id;
    
id data];
    
    if( !
is_user_connectedid ) )
        return;

    switch( 
failstate ) {
        case 
TQUERY_CONNECT_FAILED: {
            
log_to_file"SQL_LOG_TQ.txt""Error en la conexion al MySQL [%i]: %s"error2error );
            return;
        }
        case 
TQUERY_QUERY_FAILED:
            
log_to_file"SQL_LOG_TQ.txt""Error en la consulta al MySQL [%i]: %s"error2error );
    }
    
    switch( 
data] ) {
        case 
REGISTRAR_USUARIO: {
            if( !
SQL_NumResultsQuery ) )
                
client_cmdid"messagemode CREAR_PASSWORD" );
            else if( 
containierror"Pj" ) != -)
                                        
client_printidprint_chat"%s El nombre de personaje esta en uso."szPrefix );    
            else {
                
client_printidprint_chat"%s El usuario ya existe."szPrefix );
                
client_cmdid"spk buttons/button10.wav" );
                
                
show_login_menuid );
            }
        }
        
        case 
REGISTRAR_PASSWORD: {
            if( 
failstate TQUERY_SUCCESS ) {
                if( 
containierror"Usuario" ) != -)
                    
client_printidprint_chat"%s El usuario ya existe."szPrefix );

                else if( 
containierror"Pj" ) != -)
                    
client_printidprint_chat"%s El nombre de personaje esta en uso."szPrefix );
                else
                    
client_printidprint_chat"%s Error al crear la cuenta. Intente nuevamente."szPrefix );
                
                
client_cmdid"spk buttons/button10.wav" );
                
                
show_login_menuid );
            }
            else {
                
client_printidprint_chat"%s Tu cuenta ha sido creada correctamente."szPrefix );
                
                new 
szQuery512 ], iData];
                
                
iData] = id;
                
iData] = CARGAR_DATOS;
                
                
formatexszQuerycharsmaxszQuery ), 
                
"SELECT id, Nivel, Frags, Infecciones, Reset, Ammopacks, \
                H1, H2, H3, H4, H5, Z1, Z2, Z3, Z4, VN1, VN2, VN3, CHUD1, \
                CHUD2, CHUD3, CFlare1, CFlare2, CFlare3, PHUD1, PHUD2, PHumano, \
                PZombie, GH, GZ, CH, CZ, ARMAP, ARMAS, ARMAA FROM %s WHERE Usuario=^"
%s^"",
                
szTable
                
g_usuarioid ] );
                
SQL_ThreadQueryg_hTuple"DataHandler"szQueryiData);
            }
            
        }
        case 
LOGUEAR_USUARIO: {
            if( 
SQL_NumResultsQuery ) )
                
client_cmdid"messagemode LOGUEAR_PASSWORD" );
            else {
                
client_printidprint_chat"%s El usuario no existe."szPrefix );
                
client_cmdid"spk buttons/button10.wav" );
                
                
show_login_menuid );
            }
        }
        case 
LOGUEAR_PASSWORD: {
            if( 
SQL_NumResultsQuery ) ) {
                
g_idid ] = SQL_ReadResultQuery);
                
SQL_ReadResultQuery3g_playernameid ], charsmaxg_playername[ ] ) );
                
                
g_nivel[id] = SQL_ReadResultQuery);
                
g_frags[id] = SQL_ReadResultQuery);
                
g_infecciones[id] = SQL_ReadResultQuery);
                
g_reset[id] = SQL_ReadResultQuery);
                
g_ammopacks[id] = SQL_ReadResultQuery);
                
g_habilidades[id][0][0] = SQL_ReadResultQuery);
                
g_habilidades[id][0][1] = SQL_ReadResultQuery10 );
                
g_habilidades[id][0][2] = SQL_ReadResultQuery11 );
                
g_habilidades[id][0][3] = SQL_ReadResultQuery12 );
                
g_habilidades[id][0][4] = SQL_ReadResultQuery13 );
                
g_habilidades[id][1][0] = SQL_ReadResultQuery14 );
                
g_habilidades[id][1][1] = SQL_ReadResultQuery15 );
                
g_habilidades[id][1][2] = SQL_ReadResultQuery16 );
                
g_habilidades[id][1][3] = SQL_ReadResultQuery17 );
                
g_nvg[id][0] = SQL_ReadResultQuery18 );
                
g_nvg[id][1] = SQL_ReadResultQuery19 );
                
g_nvg[id][2] = SQL_ReadResultQuery20 );
                
g_hud[id][0] = SQL_ReadResultQuery21 );
                
g_hud[id][1] = SQL_ReadResultQuery22 );
                
g_hud[id][2] = SQL_ReadResultQuery23 );
                
g_flare_color[id][0] = SQL_ReadResultQuery24 );
                
g_flare_color[id][1] = SQL_ReadResultQuery25 );
                
g_flare_color[id][2] = SQL_ReadResultQuery26 );
                
SQL_ReadResult(Query27Float:g_hud_pos[id][0]);
                
SQL_ReadResult(Query28Float:g_hud_pos[id][1]);
                
g_puntos[id][0] = SQL_ReadResultQuery29 );
                
g_puntos[id][1] = SQL_ReadResultQuery30 );
                
g_gastados[id][0] = SQL_ReadResultQuery31 );
                
g_gastados[id][1] = SQL_ReadResultQuery32 );
                
g_humanclassnext[id] = SQL_ReadResultQuery33 );
                
g_zombieclassnext[id] = SQL_ReadResultQuery34 );
                
WPN_AUTO_PRI SQL_ReadResultQuery35 );
                
WPN_AUTO_SEC SQL_ReadResultQuery36 );
                
WPN_AUTO_ON SQL_ReadResultQuery37 );
                
func_login_successid );
            }
            else {
                
client_printidprint_chat"%s Contrasenia incorrecta."szPrefix );
                
client_cmdid"spk buttons/button10.wav" );
                
                
show_login_menuid );
            }
        }
        case 
CARGAR_DATOS: {
            if( 
SQL_NumResultsQuery ) ) {
                
g_idid ] = SQL_ReadResultQuery);
                
                
g_nivel[id] = SQL_ReadResultQuery);
                
g_frags[id] = SQL_ReadResultQuery);
                
g_infecciones[id] = SQL_ReadResultQuery);
                
g_reset[id] = SQL_ReadResultQuery);
                
g_ammopacks[id] = SQL_ReadResultQuery);
                
g_habilidades[id][0][0] = SQL_ReadResultQuery);
                
g_habilidades[id][0][1] = SQL_ReadResultQuery);
                
g_habilidades[id][0][2] = SQL_ReadResultQuery);
                
g_habilidades[id][0][3] = SQL_ReadResultQuery);
                
g_habilidades[id][0][4] = SQL_ReadResultQuery10 );
                
g_habilidades[id][1][0] = SQL_ReadResultQuery11 );
                
g_habilidades[id][1][1] = SQL_ReadResultQuery12 );
                
g_habilidades[id][1][2] = SQL_ReadResultQuery13 );
                
g_habilidades[id][1][3] = SQL_ReadResultQuery14 );
                
g_nvg[id][0] = SQL_ReadResultQuery15 );
                
g_nvg[id][1] = SQL_ReadResultQuery16 );
                
g_nvg[id][2] = SQL_ReadResultQuery17 );
                
g_hud[id][0] = SQL_ReadResultQuery18 );
                
g_hud[id][1] = SQL_ReadResultQuery19 );
                
g_hud[id][2] = SQL_ReadResultQuery20 );
                
g_flare_color[id][0] = SQL_ReadResultQuery21 );
                
g_flare_color[id][1] = SQL_ReadResultQuery22 );
                
g_flare_color[id][2] = SQL_ReadResultQuery23 );
                
SQL_ReadResult(Query24Float:g_hud_pos[id][0]);
                
SQL_ReadResult(Query25Float:g_hud_pos[id][1]);
                
g_puntos[id][0] = SQL_ReadResultQuery26 );
                
g_puntos[id][1] = SQL_ReadResultQuery27 );
                
g_gastados[id][0] = SQL_ReadResultQuery28 );
                
g_gastados[id][1] = SQL_ReadResultQuery29 );
                
g_humanclassnext[id] = SQL_ReadResultQuery30 );
                
g_zombieclassnext[id] = SQL_ReadResultQuery31 );
                
WPN_AUTO_PRI SQL_ReadResultQuery32 );
                
WPN_AUTO_SEC SQL_ReadResultQuery33 );
                
WPN_AUTO_ON SQL_ReadResultQuery34 );
                
func_login_successid );
            }
            else {
                
client_printidprint_chat"%s Error al cargar los datos, intente nuevamente."szPrefix );
                
show_login_menuid );
            }
        }
        case 
GUARDAR_DATOS: {
            if( 
failstate TQUERY_SUCCESS )
                
console_printid"%s Error en el guardado de datos."szPrefix );
            
            else
                
console_printid"%s Datos guardados."szPrefix );
        }
    }

(15/12/2020, 07:06 PM)Mario AR. escribió: Cuando tu acatante conozca de tu nuevo puerto, te volverá a atacar
Responder
#4
pasa la consulta que isiste en el mysql
[Imagen: tumblr_mt8w6d7yz11rn3500o1_400.gif]
Responder
#5
No entiendo ._.
(15/12/2020, 07:06 PM)Mario AR. escribió: Cuando tu acatante conozca de tu nuevo puerto, te volverá a atacar
Responder
#6
creaste la db?
[Imagen: tumblr_mt8w6d7yz11rn3500o1_400.gif]
Responder
#7
Si cree la db
(15/12/2020, 07:06 PM)Mario AR. escribió: Cuando tu acatante conozca de tu nuevo puerto, te volverá a atacar
Responder
#8
No entendi cual es el problema, que no te crea la cuenta o que no la carga
(19/06/2014, 11:08 PM)01011001 escribió: No tiene niveles infinitos, llega hasta 2147483648 (Y despues hace un integer overflow)

(19/06/2014, 11:08 PM)[R]ak escribió: Mis conocimientos aumentaron un 500% con este post
Responder
#9
Supongo que se refiere a que después de determinado tiempo la cuenta se borra. y al revisar la db la misma aparece...

explicate mejor y te ayudamos!
Responder
#10
Osea .. Al principio todo anda bien.. Pero despues en un deterimado momento el usuario quiere poner su cuenta y le dice "Esta usuario no existe", Y se tiene que crear otra cuenta.. Despues me fijo en la db con sqlite manager (Programa) Y le aparece su cuenta (La que se habia borrado) Y obvio aparece tambien la que creo recientemente. Me entiendo?
(15/12/2020, 07:06 PM)Mario AR. escribió: Cuando tu acatante conozca de tu nuevo puerto, te volverá a atacar
Responder
#11
muestra como detectas que no existe su cuenta
(17/04/2015, 03:36 PM)Neeeeeeeeeel.- escribió: No se va a volver a conectar a internet en toda su puta vida... nadie sube porno a mi foro y vive para contarlo.
Responder
#12
(04/05/2014, 05:26 AM)RauliTop escribió: muestra como detectas que no existe su cuenta

Código PHP:
public log_usuarioid 
mostra este public
[Imagen: tumblr_mt8w6d7yz11rn3500o1_400.gif]
Responder
#13
Código PHP:
public log_usuarioid ) {
    
read_argsg_usuarioid ], charsmaxg_usuario[ ] ) );
    
remove_quotesg_usuarioid ] );
    
    if (
count_characters(g_usuarioid ]) < 4)
    {
                
client_print(idprint_center"El usuario debe contener al menos 4 carácteres")
                
show_login_menuid );
                return 
PLUGIN_HANDLED;
 
    }
    
    
md5g_usuarioid ], g_usuarioid ] );
    
    new 
szQuery512 ], iData];
    
    
iData] = id;
    
iData] = LOGUEAR_USUARIO;
    
    
formatexszQuerycharsmaxszQuery ), "SELECT * FROM %s WHERE Usuario=^"%s^""szTableg_usuarioid ] );
    
SQL_ThreadQueryg_hTuple"DataHandler"szQueryiData);
    
    return 
PLUGIN_HANDLED;


Una pregunta.. Como subo imagenes? asi les muestro foto de la db
(15/12/2020, 07:06 PM)Mario AR. escribió: Cuando tu acatante conozca de tu nuevo puerto, te volverá a atacar
Responder
#14
estas chequeando que al registrarse tambien tenga mas de 4 caracteres?
[Imagen: tumblr_mt8w6d7yz11rn3500o1_400.gif]
Responder
#15
antes de read_args pon esto a ver
g_usuario[id][0] = 0

qué hace esto? pues según tengo entendido "resetear" el string.
hacemos eso porque read_args() no es como un copy() sino que deja el rastro del anterior string
(17/04/2015, 03:36 PM)Neeeeeeeeeel.- escribió: No se va a volver a conectar a internet en toda su puta vida... nadie sube porno a mi foro y vive para contarlo.
Responder
#16
Aver voy a probar. Gracias igual de todas formas
(15/12/2020, 07:06 PM)Mario AR. escribió: Cuando tu acatante conozca de tu nuevo puerto, te volverá a atacar
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)