SA-MP Forums Archive
Mysql problem [Fast] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql problem [Fast] (/showthread.php?tid=402383)



Mysql problem [Fast] - Niekshyto - 26.12.2012

Код:
mgrp_inc\mgrp_m.pwn(1344) : error 001: expected token: "-string end-", but found "-identifier-"
mgrp_inc\mgrp_m.pwn(1357) : error 001: expected token: "-string end-", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
1344 - 	mysql_connect		( MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS );
Код:
1357 - 	    mysql_connect	( MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS );



Re: Mysql problem [Fast] - Peach - 26.12.2012

Post the lines above and under 1344 and 1357


Re: Mysql problem [Fast] - Niekshyto - 26.12.2012

Код:
stock MySQLConnect( )
{
	// Funkcija: MySQLConnect( )
	// Prisijungiame prie duomenų bazės

	print        		( "MySQL: Bandoma prisijungti prie duomenų bazės." );
	mysql_connect		( MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS );
	
	mysql_query 		( "SET NAMES cp1257" );
	mysql_set_charset	( "cp1257" );

	// Patikrinam ar prisijungėme prie duomenų bazės sėkmingai
	
	if ( mysql_ping( ) == 1 )
		print			( "MySQL: Prisijungėme sėkmingai!" );
	else
	{
	    
	    print        	( "MySQL: Įvyko klaida bandant prisijungti, jungiames iљnaujo" );
	    mysql_connect	( MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS );


	    if ( mysql_ping	( ) == 1 )
	        print		( "MySQL: Antras bandymas prisijungti sėkmingas!" );
	    else
	    {
	        print		( "MySQL: Nepavyko prisijungti prie duomenų bazės." );
	        printf      ( "MySQL: Rasta %d klaidų, patikrinkite mysql_log.txt", mysql_warning_count ( ) );
	        SendRconCommand
						( "exit" );
	    }
	    
	}
}



Re: Mysql problem [Fast] - Vince - 26.12.2012

Do you even have the definitions? Or do you expect it to magically acquire the database details?


Re: Mysql problem [Fast] - Niekshyto - 26.12.2012

I was change the includes of pawno, but nothing more, i dont know, what the problem :>