Errores en GM Mysql R7 (Crash)
#1

Buenas, estoy tratando de conseguir un GM bбsico que utilice Mysql R7 y probй varios, de los cuales unos no iban bien, otro solamente guardaba la vida y la posiciуn y este que lo descargue de un pack de gm's, parece llevarlo todo pero algo mal, ya que si compro chaleco o algun arma al conectar de nuevo con el servidor se crashea (el servidor se crashea, el juego no)

El GM lo saque de aquн:
https://sampforum.blast.hk/showthread.php?tid=374051

Aquн dejo el cуdigo por si alguiйn puede ayudarme a solucionar-lo
pawn Код:
/*
    *Crйditos:
        - TEAM SA-MP
        - G-sTyLeZzZ's ( a_mysql & plugin ).
        - ZeeX ( Command Processor ).
        - Waqas Crimson
*/


#include <a_samp>
#include <a_mysql>
//#include <zcmd>

#define     Dialogo_Ingreso     ( 0001 )
#define     Dialogo_Registro    ( 0002 )

#define     MySQL_Host          ( #localhost )
#define     MySQL_User          ( #root )
#define     MySQL_Password      ( # )
#define     MySQL_Database      ( #users )

enum szInfo
{
    _pSQLID                 ,
    _Nombre         [ 24 ]  ,
    _Password       [ 24 ]  ,
    Float:_Pos      [ 4 ]   ,
    Float:_Vida             ,
    Float:_Chaleco          ,
    _Armas          [ 13 ]  ,
    _Municiones     [ 13 ]  ,
    _Skin                   ,
    _Dinero                 ,
    _Interior               ,
    _VirWorld
}

new
    PlayerInfo[ MAX_PLAYERS ][ szInfo ] ,
    SaveAccountTimer                    ,
    ConnectionHandle
;

native sscanf(const data[], const format[], {Float,_}:...);
native unformat(const data[], const format[], {Float,_}:...) = sscanf;

static const Float:randomSpawns[ 9 ][ 3 ] = { //LVDM
    { 1958.3783 , 1343.1572 , 15.3746 } , {2199.6531 , 1393.3678 , 10.8203 } , { 2483.5977 , 1222.0825 , 10.8203 } ,
    { 2637.2712 , 1129.2743 , 11.1797 } , {2000.0106 , 1521.1111 , 17.0625 } , { 2024.8190 , 1917.9425 , 12.3386 } ,
    { 2261.9048 , 2035.9547 , 10.8203 } , {2262.0986 , 2398.6572 , 10.8203 } , { 2244.2566 , 2523.7280 , 10.8203 } }
;

main()
{
    print(# !! ============================ !! ),
    print(# !! ==== MySQL - R7  script ==== !! ),
    print(# !! ============================ !! );
    //CrearCuenta( "Waqas_Crimson", "Password", -1 );
}

public OnGameModeInit()
{
    ConnectMySQL();
    DisableInteriorEnterExits();
    SetGameModeText(#MySQL - R7 Script);
    SendRconCommand(#mapname ? );
    SaveAccountTimer = SetTimer( #UpdateAccounts, 9000*100, true );
    return AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0), 1;
}

ConnectMySQL()
{
    ConnectionHandle = mysql_connect( MySQL_Host, MySQL_User, MySQL_Database, MySQL_Password )          ;
    print(#\n ----- MySQL ----- )                                                                       ;
    if( mysql_ping( ConnectionHandle ) >= 1 )
    {
        mysql_debug( true )                                                                             ,
        print(#Servidor: La conexiуn con la base de datos a tenido йxito. Servidor iniciado)            ;
    }
    else
    {
        ConnectionHandle = mysql_connect( MySQL_Host , MySQL_User , MySQL_Database , MySQL_Password )                                   ,
        print(#\t[Warning] Servidor: No se encuentra la base de datos. \n\tReconecctando en 10 segundos.)       ;

        if (    (   mysql_ping( ConnectionHandle ) == 1
            ?   ( print(#Servidor: La conexiуn con la base de datos a tenido йxito.) )
            :   ( print(#[Error] No se logro la conexiуn con la base de datos.\n), SendRconCommand(#exit)  )
            )   )   { }
    }
    print(#\n--------------------\n );
}

public OnGameModeExit()
{
    return KillTimer( SaveAccountTimer ), 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    static
        Consulta[ 80 ] ;
       
    mysql_format( ConnectionHandle, Consulta , #SELECT `ID_User` FROM `Usuarios` WHERE `Nombre` = '%s' LIMIT 1, GetPName( playerid ) );
    return mysql_function_query(ConnectionHandle, Consulta, true, #OnUserExist, #d, playerid), 1;
}

forward OnUserExist( playerid );
public OnUserExist( playerid )
{
    static
        rows,
        fields
    ;
    cache_get_data(rows, fields, ConnectionHandle);
   
    printf("OnUserExist: playerid = %i, rows = %i", playerid, rows );

    if( ( 0 < rows < 2
        ? ( ShowPlayerDialog( playerid , Dialogo_Ingreso , DIALOG_STYLE_PASSWORD , #Ingreso , #Introduzca su password para ingresar. , #Aceptar , #Cancelar ) )
        : ( ShowPlayerDialog( playerid , Dialogo_Registro , DIALOG_STYLE_PASSWORD , #Registro , #Introduzca una password para su cuenta. , #Aceptar , #Cancelar ) ) ) )
    {
        SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746)           ,
        SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746)     ;
    }
    return SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746) , 1;
}

public OnPlayerConnect(playerid)
{
    return LimpiarVariables( playerid ), 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return GuardarCuenta( playerid ), 1;
}

public OnPlayerSpawn(playerid)
{
    if( GetPVarInt( playerid, #Death) == 1 ) {
        new rand = random( sizeof randomSpawns );
        return SetPlayerPos( playerid , randomSpawns[ rand ][ 0 ] , randomSpawns[ rand ][ 1 ] , randomSpawns[ rand ][ 2 ] ), 1;
    }
    else
        return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return SetPVarInt(playerid,  #Death, 1 ), 1;
}

public OnPlayerText(playerid, text[])
{
    static
        texto [ 125 ]
    ;
    format( texto , sizeof texto , #* %s dice: %s, GetPName( playerid ), text );
    return SendClientMessageToAll( ~0 , texto ), 1;
}

    #if defined _zcmd_included

public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if( GetPVarInt( playerid, #Login ) != 1 )
        return SendClientMessage( playerid , ~0 , #No puedes utilizar comandos hasta no haberte logeado y/o registrado ) , Kick( playerid ) , 0;
    return printf( "OnPlayerCommandReceived( %i, %s )" , playerid , cmdtext ), 1;
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if ( success )
        return printf( "OnPlayerCommandPerformed( %i, %s, %i )" , playerid , cmdtext , success ), 1;
    else
        return SendClientMessage( playerid , ~0, #Has ingresado un comando errуneo o incorrecto.), 1;
}

            #else

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[ 256 ], idx;
    cmd = strtok(cmdtext, idx);

    if (strcmp(#/acreate, cmd , true ) == 0 && strlen( cmdtext ) >= 8)
    {
        if( IsPlayerAdmin( playerid ) )
        {
            static
                Cadenas[ 2 ][ 30 ]
            ;
            Cadenas[ 0 ] = strtok( cmdtext, idx );
            if( Cadenas[ 0 ][ 0 ] == '\1' && Cadenas[ 0 ][ 1 ] == '\0' )
                return SendClientMessage( playerid , ~0, #Modo de uso: '/acreate' [Nombre_Apellido] [Password]) , 1;
            else {
                Cadenas[ 1 ] = strtok( cmdtext , idx );
                if( Cadenas[ 1 ][ 0 ] == '\1' && Cadenas[ 1 ][ 1 ] == '\0' )
                    return SendClientMessage( playerid , ~0 , #Modo de uso: '/acreate' [Nombre_Apellido] [Password]) , 1;
                else
                    return SendClientMessage( playerid, ~0, #La cuenta debio ser creada. Revise el directorio.) ,
                            CrearCuenta( Cadenas[ 0 ], Cadenas[ 1 ] ), 1                                        ;
            }
        }
        else
            return 0;
    }
    return 0;
}

strtok(const string[], &index)
{
    new length = strlen( string );
    while ( ( index < length ) && ( string[ index ] <= ' ' ) )
    {
        index++;
    } new offset = index, result[ 20 ];
    while ( ( index < length ) && ( string[ index ] > ' ' ) && ( ( index - offset ) < ( sizeof( result ) - 1) ) )
    {
        result[ index - offset ] = string[ index ], index++;
    } result[ index - offset ] = EOS;
    return result;
}

    #endif


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case Dialogo_Registro:
        {
            if( !response ) return Kick( playerid ), 1;
            if(  response ) {

                if( inputtext[ 0 ] == '\1' && inputtext[ 1 ] == '\0' )
                    return ShowPlayerDialog( playerid , Dialogo_Registro , DIALOG_STYLE_PASSWORD , #Registro., #Debes insertar un password., #Registrar., #Cancelar.) , 1;
                else {
               
                    new
                        len = strlen( inputtext );
                    if( 0 >= len >= 25 )
                        return ShowPlayerDialog( playerid , Dialogo_Registro , DIALOG_STYLE_PASSWORD , #Registro., "Lнmites de password:\n\t ( Mнn: 1 | Mбx: 24 ).", #Registrar., #Cancelar.) , 1;
                    else
                        return CrearCuenta( GetPName( playerid ) , inputtext , playerid ) , 1;
                }
            }
        }
        case Dialogo_Ingreso:
        {
            if( !response ) return Kick( playerid ), 1;
            if( response ) {

                if( inputtext[ 0 ] == '\1' && inputtext[ 1 ] == '\0' )
                    return ShowPlayerDialog( playerid , Dialogo_Ingreso , DIALOG_STYLE_PASSWORD , #Ingreso., #Tiene que insertar un password!., #Ingresar., #Aceptar.), 1;
                else {

                    new
                        len = strlen( inputtext );

                    if( 0 >= len >= 25 )
                        return ShowPlayerDialog( playerid , Dialogo_Ingreso , DIALOG_STYLE_PASSWORD , #Ingreso., "Lнmites de password:\n\t ( Mнn: 1 | Mбx: 24 ).", #Registrar., #Cancelar.) , 1;
                    else
                    {
                        static
                            Consulta[ 128 ];
                           
                        mysql_format(ConnectionHandle, Consulta, "SELECT * FROM `Usuarios` WHERE `Nombre` = '%s' AND `Password` = '%s'", GetPName( playerid ), inputtext);
                        printf("%s", Consulta);
                        mysql_function_query( ConnectionHandle , Consulta , true , #CargarUsuario , #d , playerid );
                        return 1;
                    }
                }
            }
        }
    }
    return 1;
}

GuardarCuenta( playerid )
{
    if( GetPVarInt( playerid, #Login ) == 1 )
    {
        static
            Consulta [ 256 ];

        GetPlayerPos( playerid, PlayerInfo[ playerid ][ _Pos ][ 0 ], PlayerInfo[ playerid ][ _Pos ][ 1 ], PlayerInfo[ playerid ][ _Pos ][ 2 ] ) ,
        GetPlayerFacingAngle( playerid, PlayerInfo[ playerid ][ _Pos ][ 3 ] )                                                                   ,
        GetPlayerHealth( playerid, PlayerInfo[ playerid ][ _Vida ] )                                                                            ,
        GetPlayerArmour( playerid, PlayerInfo[ playerid ][ _Chaleco ] )                                                                         ,
        PlayerInfo[ playerid ][ _Dinero ]   = GetPlayerMoney        ( playerid )                                                                ,
        PlayerInfo[ playerid ][ _Interior ] = GetPlayerInterior     ( playerid )                                                                ,
        PlayerInfo[ playerid ][ _VirWorld ] = GetPlayerVirtualWorld ( playerid )                                                                ;

        // ------------------------------------- //

        mysql_format( ConnectionHandle, Consulta, "UPDATE `Usuarios` SET Password='%s', PosX=%.4f, PosY=%.4f, PosZ=%.4f, Ang=%.4f, Vida=%.2f, Chaleco=%.2f WHERE `Nombre` = '%s' AND `ID_User` = '%i';", PlayerInfo[ playerid ][ _Password ], PlayerInfo[ playerid ][ _Pos ][ 0 ],
        PlayerInfo[ playerid ][ _Pos ][ 1 ], PlayerInfo[ playerid ][ _Pos ][ 2 ], PlayerInfo[ playerid ][ _Pos ][ 3 ], PlayerInfo[ playerid ][ _Vida ], PlayerInfo[ playerid ][ _Chaleco ], GetPName( playerid ), PlayerInfo[ playerid ][ _pSQLID ] );
        mysql_function_query( ConnectionHandle , Consulta , false, # , # ) ;

        // ------------------------------------- //

        for( new i; i<13; i++ ) {
            GetPlayerWeaponData( playerid, i, PlayerInfo[ playerid ][ _Armas ][ i ], PlayerInfo[ playerid ][ _Municiones ][ i ] );
            mysql_format( ConnectionHandle, Consulta, "UPDATE `Usuarios` SET Arma_%i=%i, Municion_%i=%i WHERE `Nombre` = '%s' AND `ID_User` = '%i';", i, PlayerInfo[ playerid ][ _Armas ][ i ], PlayerInfo[ playerid ][ _Municiones ][ i ], GetPName( playerid ), PlayerInfo[ playerid ][ _pSQLID ] );
            mysql_function_query( ConnectionHandle , Consulta , false, # , # ) ;
        }

        // ------------------------------------- //

        mysql_format( ConnectionHandle, Consulta, "UPDATE `Usuarios` SET Skin=%i, Dinero=%i, Interior=%i, VirWorld=%i WHERE `Nombre` = '%s' AND `ID_User` = '%i';", PlayerInfo[ playerid ][ _Skin ], PlayerInfo[ playerid ][ _Dinero ], PlayerInfo[ playerid ][ _Interior ], PlayerInfo[ playerid ][ _VirWorld ], GetPName( playerid ),
        PlayerInfo[ playerid ][ _pSQLID ]);
        mysql_function_query( ConnectionHandle , Consulta , false, # , # ) ;
    }
    return 1;
}

forward CargarUsuario( playerid );
public CargarUsuario( playerid )
{
    static
        rows  ,
        fields
    ;
    cache_get_data(rows, fields, ConnectionHandle);

    printf(" rows = %i, fields = %i", rows, fields );

    if( 0 < rows < 2 ) {

        static
            tmp[ 128 ]
        ;

        cache_get_row( 0, 0, tmp ), PlayerInfo[ playerid ][ _pSQLID ] = strval( tmp );
        cache_get_row( 0, 1, PlayerInfo[ playerid ][ _Nombre ] );
        cache_get_row( 0, 2, PlayerInfo[ playerid ][ _Password ] );
        cache_get_row( 0, 3, tmp ), PlayerInfo[ playerid ][ _Pos ][ 0 ] = floatstr( tmp );
        cache_get_row( 0, 4, tmp ), PlayerInfo[ playerid ][ _Pos ][ 1 ] = floatstr( tmp );
        cache_get_row( 0, 5, tmp ), PlayerInfo[ playerid ][ _Pos ][ 2 ] = floatstr( tmp );
        cache_get_row( 0, 6, tmp ), PlayerInfo[ playerid ][ _Pos ][ 3 ] = floatstr( tmp );
        cache_get_row( 0, 7, tmp ), PlayerInfo[ playerid ][ _Vida ] = floatstr( tmp );
        cache_get_row( 0, 8, tmp ), PlayerInfo[ playerid ][ _Chaleco ] = floatstr( tmp );
        cache_get_row( 0, 9, tmp ), PlayerInfo[ playerid ][ _Armas ][ 0 ] = strval( tmp );
        cache_get_row( 0, 10, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 0 ] = strval( tmp );
        cache_get_row( 0, 11, tmp ), PlayerInfo[ playerid ][ _Armas ][ 1 ] = strval( tmp );
        cache_get_row( 0, 12, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 1 ] = strval( tmp );
        cache_get_row( 0, 13, tmp ), PlayerInfo[ playerid ][ _Armas ][ 2 ] = strval( tmp );
        cache_get_row( 0, 14, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 2 ] = strval( tmp );
        cache_get_row( 0, 15, tmp ), PlayerInfo[ playerid ][ _Armas ][ 3 ] = strval( tmp );
        cache_get_row( 0, 16, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 3 ] = strval( tmp );
        cache_get_row( 0, 17, tmp ), PlayerInfo[ playerid ][ _Armas ][ 4 ] = strval( tmp );
        cache_get_row( 0, 18, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 4 ] = strval( tmp );
        cache_get_row( 0, 19, tmp ), PlayerInfo[ playerid ][ _Armas ][ 5 ] = strval( tmp );
        cache_get_row( 0, 20, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 5 ] = strval( tmp );
        cache_get_row( 0, 21, tmp ), PlayerInfo[ playerid ][ _Armas ][ 6 ] = strval( tmp );
        cache_get_row( 0, 22, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 6 ] = strval( tmp );
        cache_get_row( 0, 23, tmp ), PlayerInfo[ playerid ][ _Armas ][ 7 ] = strval( tmp );
        cache_get_row( 0, 24, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 7 ] = strval( tmp );
        cache_get_row( 0, 25, tmp ), PlayerInfo[ playerid ][ _Armas ][ 8 ] = strval( tmp );
        cache_get_row( 0, 26, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 8 ] = strval( tmp );
        cache_get_row( 0, 27, tmp ), PlayerInfo[ playerid ][ _Armas ][ 9 ] = strval( tmp );
        cache_get_row( 0, 28, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 9 ] = strval( tmp );
        cache_get_row( 0, 29, tmp ), PlayerInfo[ playerid ][ _Armas ][ 10 ] = strval( tmp );
        cache_get_row( 0, 30, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 10 ] = strval( tmp );
        cache_get_row( 0, 31, tmp ), PlayerInfo[ playerid ][ _Armas ][ 11 ] = strval( tmp );
        cache_get_row( 0, 32, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 11 ] = strval( tmp );
        cache_get_row( 0, 33, tmp ), PlayerInfo[ playerid ][ _Armas ][ 12 ] = strval( tmp );
        cache_get_row( 0, 34, tmp ), PlayerInfo[ playerid ][ _Municiones ] [ 12 ] = strval( tmp );
        cache_get_row( 0, 35, tmp ), PlayerInfo[ playerid ][ _Skin ] = strval( tmp );
        cache_get_row( 0, 36, tmp ), PlayerInfo[ playerid ][ _Dinero ] = strval( tmp );
        cache_get_row( 0, 37, tmp ), PlayerInfo[ playerid ][ _Interior ] = strval( tmp );
        cache_get_row( 0, 38, tmp ), PlayerInfo[ playerid ][ _VirWorld ] = strval( tmp );
       
        if( GetPVarInt( playerid, #Login ) != 1 ) {

            // ------------------------------------- //

            SetSpawnInfo( playerid, 0,  PlayerInfo[ playerid ][ _Skin ], PlayerInfo[ playerid ][ _Pos ][ 0 ],
                                    PlayerInfo[ playerid ][ _Pos ][ 1 ], PlayerInfo[ playerid ][ _Pos ][ 2 ],
                                    PlayerInfo[ playerid ][ _Pos ][ 3 ], 0, 0, 0, 0, 0, 0)  ,
            SpawnPlayer( playerid )                                                             ,
            SetPlayerInterior( playerid, PlayerInfo[ playerid ][ _Interior ])                   ,
            SetPlayerVirtualWorld( playerid, PlayerInfo[ playerid ][ _VirWorld ] )              ,
            SetPlayerHealth( playerid, PlayerInfo[ playerid ][ _Vida ] )                        ,
            SetPlayerArmour( playerid, PlayerInfo[ playerid ][ _Chaleco ] )                     ,
            GivePlayerMoney( playerid, PlayerInfo[ playerid ][ _Dinero ])                       ,
            SetPVarInt( playerid, #Login, 1 )                                                   ;

            // ------------------------------------- //

            for( new i = 0; i<= 11; i++) GivePlayerWeapon( playerid, PlayerInfo[ playerid ][ _Armas ][ i ], PlayerInfo[ playerid ][ _Municiones ][ i ] );
            for( new i = 0; i<= 11; i++) GivePlayerWeapon( playerid, PlayerInfo[ playerid ][ _Armas ][ i ], PlayerInfo[ playerid ][ _Municiones ][ i ] );
            // ------------------------------------- //

            return SendClientMessage( playerid, ~0, #Bienvenido de nuevo.), 1;
        }
        return 1;
    }
    else {
   
        static
            szFormatMessageKick[ 128 ]
        ;
        // ------------------------------------- //

        SetPVarInt( playerid, #MAX_LOG_ERR, GetPVarInt( playerid, #MAX_LOG_ERR ) +1 );

        // ------------------------------------- //

        if( GetPVarInt( playerid, #MAX_LOG_ERR ) > 2 ) {
       
            SendClientMessage( playerid, ~0, #Ў Password Errуnea ! );
            format( szFormatMessageKick, sizeof szFormatMessageKick, #**%s fue kickeado por fallar 3 veces en sъ password, GetPName( playerid ) );
            return SendClientMessageToAll( ~0, szFormatMessageKick ), 1;

        } else {

            SendClientMessage( playerid, ~0, #Ў Password Errуnea ! );
            return ShowPlayerDialog( playerid, Dialogo_Ingreso, DIALOG_STYLE_PASSWORD, #Ingreso., #No insertaste una contraseсa vбlida., #Aceptar., #Cancelar.), 1;
        }
    }
}

CrearCuenta( Usuario[], Password[], playerid = -1 )
{
    static
        Consulta[ 215 ]
    ;
    if( Usuario[ 0 ] | Password[ 0 ] == '\1' && Usuario[ 1 ] | Password[ 1 ] == '\0' )
        return print(#[Error] No se pudo crear una cuenta de usuario.), 0;
    else {
   
        mysql_format( ConnectionHandle, Consulta, "INSERT INTO `Usuarios` ( Nombre, Password, Vida, PosX, PosY, PosZ, Skin, Dinero) VALUES ( '%s', '%s', 100.0, 1958.3783, 1343.1572, 15.3746, 26, 9000 );", Usuario, Password );
        mysql_function_query( ConnectionHandle , Consulta , false, # , # ) ;
        ShowPlayerDialog( playerid, Dialogo_Ingreso, DIALOG_STYLE_PASSWORD, #Panel de ingreso., #Introduzca su password., #Entrar., #Salir.);

        return printf(#[AVISO] La cuenta %s a sido registrada., Usuario), true;
    }
}

GetPName( playerid )
{
    static
        szNombre[   MAX_PLAYER_NAME     ]
    ;
    GetPlayerName( playerid, szNombre, MAX_PLAYER_NAME );
    return szNombre;
}

LimpiarVariables( playerid )
{
    // ------------------------------------- //

    PlayerInfo[ playerid ][ _pSQLID ] = -1              ,
    PlayerInfo[ playerid ][ _Nombre ] = '\1'            ,
    PlayerInfo[ playerid ][ _Password ] = '\1'          ,
    PlayerInfo[ playerid ][ _Pos ][ 0 ] = 1958.3783     ,
    PlayerInfo[ playerid ][ _Pos ][ 1 ] = 1343.1572     ,
    PlayerInfo[ playerid ][ _Pos ][ 2 ] = 15.3746       ,
    PlayerInfo[ playerid ][ _Pos ][ 3 ] = 90.0          ,
    PlayerInfo[ playerid ][ _Vida ]     = 100.0          ,
    PlayerInfo[ playerid ][ _Chaleco ]  = 20.0          ;

        // ------------------------------------- //

    for( new i; i <= 13; ++i )
        PlayerInfo[ playerid ][ _Armas ][ i ] = 0, PlayerInfo[ playerid ][ _Municiones ][ i ] = 0 ;

        // ------------------------------------- //

    PlayerInfo[ playerid ][ _Skin ]     = 26            ,
    PlayerInfo[ playerid ][ _Dinero ]   = 0             ,
    PlayerInfo[ playerid ][ _Interior ] = 0             ,
    PlayerInfo[ playerid ][ _VirWorld ] = 0             ;
    return true;
}

forward UpdateAccounts();
public UpdateAccounts()
{
    for( new i, j= GetMaxPlayers(); i<j; i++) if( GetPVarInt( i, #Login ) == 1 ) GuardarCuenta( i );
}
Aquн dejo la informaciуn sobre los errores

server_log.txt
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e-R2, ©2005-2012 SA-MP Team

[10:57:39] 
[10:57:39] Server Plugins
[10:57:39] --------------
[10:57:39]  Loading plugin: mysql
[10:57:39] 

  > MySQL plugin R7 successfully loaded.

[10:57:39]   Loaded.
[10:57:39]  Loading plugin: crashdetect
[10:57:39]   crashdetect v4.8.3 is OK.
[10:57:39]   Loaded.
[10:57:39]  Loaded 2 plugins.

[10:57:39] 
[10:57:39] Filterscripts
[10:57:39] ---------------
[10:57:39]   Loading filterscript 'gl_property.amx'...
[10:57:39] 
-----------------------------------
[10:57:39] Grand Larceny Property Filterscript		
[10:57:39] -----------------------------------

[10:57:39]   Loaded 1 filterscripts.

[10:57:39] 
 ----- MySQL -----
[10:57:39] Servidor: La conexiуn con la base de datos a tenido йxito. Servidor iniciado
[10:57:39] 
--------------------

[10:57:39] Reading File: blank
[10:57:39] Reading File: properties/houses.txt
[10:57:39] Reading File: properties/businesses.txt
[10:57:39] Reading File: properties/banks.txt
[10:57:39] Reading File: properties/police.txt
[10:57:39] !! ============================ !!
[10:57:39] !! ==== MySQL - R7  script ==== !!
[10:57:39] !! ============================ !!
[10:57:39] Number of vehicle models: 0
[10:59:35] Incoming connection: 127.0.0.1:62327
[10:59:35] [join] Yona has joined the server (0:127.0.0.1)
[10:59:35] [debug] Run time error 4: "Array index out of bounds"
[10:59:35] [debug]  Accessing element at index 13 past array upper bound 12
[10:59:35] [debug] AMX backtrace:
[10:59:35] [debug] #0 000042d8 in ?? () from MySQL-R7.amx
[10:59:35] [debug] #1 00000718 in public OnPlayerConnect () from MySQL-R7.amx
[10:59:35] OnUserExist: playerid = 0, rows = 0
[10:59:40] [AVISO] La cuenta Yona a sido registrada.
[10:59:42] SELECT * FROM `Usuarios` WHERE `Nombre` = 'Yona' AND `Password` = 'Yona'
[10:59:42]  rows = 1, fields = 39
[11:00:41] [part] Yona has left the server (0:1)
[11:01:08] Incoming connection: 127.0.0.1:60625
[11:01:09] [join] Yona has joined the server (0:127.0.0.1)
[11:01:09] [debug] Run time error 4: "Array index out of bounds"
[11:01:09] [debug]  Accessing element at index 13 past array upper bound 12
[11:01:09] [debug] AMX backtrace:
[11:01:09] [debug] #0 000042d8 in ?? () from MySQL-R7.amx
[11:01:09] [debug] #1 00000718 in public OnPlayerConnect () from MySQL-R7.amx
[11:01:09] [debug] Server crashed due to an unknown error
[11:01:09] [debug] System backtrace:
[11:01:09] [debug] #0 7722e023 in ?? () from C:\Windows\SysWOW64\ntdll.dll
[11:01:09] [debug] #1 763114dd in ?? () from C:\Windows\syswow64\kernel32.dll
[11:01:09] [debug] #2 72ff3c1b in ?? () from C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll
[11:01:09] [debug] #3 698ebe9a in ?? () from C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCP90.dll
[11:01:09] [debug] #4 698ebf88 in ?? () from C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCP90.dll
[11:01:09] [debug] #5 699039a0 in ?? () from C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCP90.dll
[11:01:09] [debug] #6 69908d63 in ?? () from C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCP90.dll
[11:01:09] [debug] #7 1000a4e7 in ?? () from C:\Users\X\X\plugins\mysql.DLL
[11:01:09] [debug] #8 763133aa in ?? () from C:\Windows\syswow64\kernel32.dll
[11:01:09] [debug] #9 77239ef2 in ?? () from C:\Windows\SysWOW64\ntdll.dll
[11:01:09] [debug] #10 77239ec5 in ?? () from C:\Windows\SysWOW64\ntdll.dll
crashinfo.txt
Код:
--------------------------

SA-MP Server: 0.3e-R2



Exception At Address: 0x77239EC5 Module: (ntdll.dll)



Registers:

EAX: 0x57003236	EBX: 0x02CB7C60	ECX: 0x02CB0000	EDX: 0x02CB7C60

ESI: 0x02DDEA29	EDI: 0x02CB7C58	EBP: 0x0312FFEC	ESP: 0x0312FFDC

EFLAGS: 0x00010202



Stack:

+0000: 0x1000A390   0x00000000   0x00000000   0x00000000

+0010: 0x00000000   0x00000000   0x1000A390   0x00000000

+0020: 0x00000000   0x7CFC4AD9   0x0101F441   0xFFEEFFEE

+0030: 0x00000000   0x05A70010   0x032A0010   0x032A0000

+0040: 0x03130000   0x00000100   0x03130040   0x03230000

+0050: 0x00000000   0x00000001   0x00000000   0x0322FFF0

+0060: 0x0322FFF0   0xB8F4702F   0x0801F449   0x0069D430

+0070: 0xFFFFFFFF   0x00000000   0x00000000   0x00000000

+0080: 0x00000000   0x032A7710   0x032A7710   0x00000020

+0090: 0x032A0000   0x00000000   0x00000009   0x00000000

+00A0: 0x00000002   0x00000008   0x00000000   0x000007F8

+00B0: 0x00000000   0x03214F50   0x00000002   0x00000000

+00C0: 0x00000000   0x00000000   0x00000000   0x00000000

+00D0: 0x00000000   0x00000000   0x00000000   0x00000000

+00E0: 0x00020000   0x00000000   0x00000000   0x00000000

+00F0: 0x00000000   0x00000001   0x00000000   0x031B1DE0

+0100: 0x00000001   0x00000005   0x00000000   0x00000000

+0110: 0x00000000   0x00000002   0x00000000   0x00000000

+0120: 0x00000000   0x00000000   0x00000000   0x00000000

+0130: 0x00000000   0x00000000   0x00000000   0x00000000



--------------------------



Loaded Modules:

samp-server.exe	A: 0x00400000 - 0x004F5000	(C:\Users\X\X\samp-server.exe)

ntdll.dll	A: 0x77200000 - 0x77380000	(C:\Windows\SysWOW64\ntdll.dll)

kernel32.dll	A: 0x76300000 - 0x76410000	(C:\Windows\syswow64\kernel32.dll)

KERNELBASE.dll	A: 0x76090000 - 0x760D7000	(C:\Windows\syswow64\KERNELBASE.dll)

SHELL32.dll	A: 0x75440000 - 0x7608A000	(C:\Windows\syswow64\SHELL32.dll)

msvcrt.dll	A: 0x74F80000 - 0x7502C000	(C:\Windows\syswow64\msvcrt.dll)

SHLWAPI.dll	A: 0x76410000 - 0x76467000	(C:\Windows\syswow64\SHLWAPI.dll)

GDI32.dll	A: 0x753A0000 - 0x75430000	(C:\Windows\syswow64\GDI32.dll)

USER32.dll	A: 0x74A10000 - 0x74B10000	(C:\Windows\syswow64\USER32.dll)

ADVAPI32.dll	A: 0x75160000 - 0x75200000	(C:\Windows\syswow64\ADVAPI32.dll)

sechost.dll	A: 0x75380000 - 0x75399000	(C:\Windows\SysWOW64\sechost.dll)

RPCRT4.dll	A: 0x76630000 - 0x76720000	(C:\Windows\syswow64\RPCRT4.dll)

SspiCli.dll	A: 0x748E0000 - 0x74940000	(C:\Windows\syswow64\SspiCli.dll)

CRYPTBASE.dll	A: 0x748D0000 - 0x748DC000	(C:\Windows\syswow64\CRYPTBASE.dll)

LPK.dll	A: 0x74ED0000 - 0x74EDA000	(C:\Windows\syswow64\LPK.dll)

USP10.dll	A: 0x74CC0000 - 0x74D5D000	(C:\Windows\syswow64\USP10.dll)

WSOCK32.dll	A: 0x71E60000 - 0x71E67000	(C:\Windows\system32\WSOCK32.dll)

WS2_32.dll	A: 0x74F40000 - 0x74F75000	(C:\Windows\syswow64\WS2_32.dll)

NSI.dll	A: 0x74D60000 - 0x74D66000	(C:\Windows\syswow64\NSI.dll)

WINMM.dll	A: 0x71E10000 - 0x71E42000	(C:\Windows\system32\WINMM.dll)

IMM32.DLL	A: 0x74EE0000 - 0x74F40000	(C:\Windows\system32\IMM32.DLL)

MSCTF.dll	A: 0x74940000 - 0x74A0C000	(C:\Windows\syswow64\MSCTF.dll)

nvinit.dll	A: 0x72F50000 - 0x72F83000	(C:\Windows\SysWOW64\nvinit.dll)

detoured.dll	A: 0x0F000000 - 0x0F006000	(C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\detoured.dll)

nvd3d9wrap.dll	A: 0x74660000 - 0x7469C000	(C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvd3d9wrap.dll)

SETUPAPI.dll	A: 0x767A0000 - 0x7693D000	(C:\Windows\syswow64\SETUPAPI.dll)

CFGMGR32.dll	A: 0x75230000 - 0x75257000	(C:\Windows\syswow64\CFGMGR32.dll)

OLEAUT32.dll	A: 0x74B10000 - 0x74B9F000	(C:\Windows\syswow64\OLEAUT32.dll)

DEVOBJ.dll	A: 0x760E0000 - 0x760F2000	(C:\Windows\syswow64\DEVOBJ.dll)

nvdxgiwrap.dll	A: 0x745D0000 - 0x7460B000	(C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvdxgiwrap.dll)

mysql.DLL	A: 0x10000000 - 0x10015000	(C:\Users\X\X\plugins\mysql.DLL)

LIBMYSQL.dll	A: 0x02A50000 - 0x02B91000	(C:\Users\X\X\LIBMYSQL.dll)

MSVCR90.dll	A: 0x72F90000 - 0x73033000	(C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll)

MSVCP90.dll	A: 0x698E0000 - 0x6996E000	(C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCP90.dll)

NLAapi.dll	A: 0x72450000 - 0x72460000	(C:\Windows\system32\NLAapi.dll)

napinsp.dll	A: 0x71FC0000 - 0x71FD0000	(C:\Windows\system32\napinsp.dll)

pnrpnsp.dll	A: 0x71FA0000 - 0x71FB2000	(C:\Windows\system32\pnrpnsp.dll)

mswsock.dll	A: 0x728E0000 - 0x7291C000	(C:\Windows\System32\mswsock.dll)

DNSAPI.dll	A: 0x71ED0000 - 0x71F14000	(C:\Windows\system32\DNSAPI.dll)

winrnr.dll	A: 0x71EC0000 - 0x71EC8000	(C:\Windows\System32\winrnr.dll)

wshbth.dll	A: 0x71F90000 - 0x71F9D000	(C:\Windows\system32\wshbth.dll)

WLIDNSP.DLL	A: 0x71F60000 - 0x71F87000	(C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL)

PSAPI.DLL	A: 0x75430000 - 0x75435000	(C:\Windows\syswow64\PSAPI.DLL)

rasadhlp.dll	A: 0x71EB0000 - 0x71EB6000	(C:\Windows\system32\rasadhlp.dll)

MSVCP100.dll	A: 0x73410000 - 0x73479000	(C:\Windows\system32\MSVCP100.dll)

MSVCR100.dll	A: 0x73350000 - 0x7340F000	(C:\Windows\system32\MSVCR100.dll)

wshtcpip.dll	A: 0x71EA0000 - 0x71EA5000	(C:\Windows\System32\wshtcpip.dll)

IPHLPAPI.DLL	A: 0x72960000 - 0x7297C000	(C:\Windows\system32\IPHLPAPI.DLL)

WINNSI.DLL	A: 0x72930000 - 0x72937000	(C:\Windows\system32\WINNSI.DLL)
Espero que alguien pueda ayudarme, gracias de antemano

Saludos
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)