Code not working
#1

hi i have this code:
pawn Код:
new
                KadaAtsijunge[ 50 ];
            mysql_get_field( "AtsijungeP", KadaAtsijunge );
            if( strval( KadaAtsijunge ) !=  strval( GautiDiena( ) ) )
            {
                zInfo[ playerid ][ praleistas ] = 0;
                zInfo[ playerid ][ afondas ] = 0;
            }
and it's not working, in mysql debug i get this:
Quote:

[21:51:56] CMySQLHandler::FetchField("AtsijungeP") - 2014.03.01

[21:51:56] >> mysql_retrieve_row( Connection handle: 1 )

everything looks okey
I whant that if it's not the same day it will set veriables to zeros, in this script the KadaAtsijunge is 2014.03.01 and GautiDiena( ) should be 2014.04.01 but the code witch must be called after mismach not been called

pawn Код:
stock GautiDiena( )
    {
        /* gauname data ir laika tokiu formatu METAI.MENUO.DIENA, VALANDA:MINUTE */
        new
            string[ 31 ],
            data[ 3 ];
        getdate( data[ 0 ], data[ 1 ], data[ 2 ] );
        format( string, 31, "%d.%02d.%02d", data[ 0 ], data[ 1 ] ,data[ 2 ] );
        return string;
    }
i printed this function and i get nonsense
pawn Код:
printf( "%s %s", strval( KadaAtsijunge ), strval( GautiDiena( ) ) );
Quote:

[22:11:47] Ћ14.04.01 ЋЋ14.04.01

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)