SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 08/11/2018, 12:59 AM   #1
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 177
Reputation: 9
Default Russian text is crashing my server

My server have multi languaje system but when a russian player search an items it crash my server I don't know why (I had to install a debug because crashdetect.so don't show anything ....... )

Quote:
[03:32:10] [DEBUG:IDIOMA1] KEY[1]: ~G~Press c to begin your search
[03:32:10] [DEBUG:IDIOMA1] KEY[0]: FOUNDITEM
[03:32:10] [DEBUG:IDIOMA1] KEY[1]: %s нашёл(-ла) %s
[03:32:10] [DEBUG:IDIOMA1] KEY[0]: ITEM1
[03:32:10] [DEBUG:IDIOMA1] KEY[1]: Маленькая аптечка
Crash....
Quote:
[12:18:14] [DEBUG:IDIOMA1] KEY[1]: ~G~Press c to begin your search
[12:18:16] [DEBUG:IDIOMA1] KEY[0]: FOUNDITEM
[12:18:16] [DEBUG:IDIOMA1] KEY[1]: %s нашёл(-ла) %s
[12:18:16] [DEBUG:IDIOMA1] KEY[0]: ITEM3
[12:18:16] [DEBUG:IDIOMA1] KEY[1]: Большая аптечка
Crash....
Quote:
[19:50:08] [DEBUG:IDIOMA1] KEY[1]: ~G~Press c to begin your search
[19:50:13] [DEBUG:IDIOMA1] KEY[0]: FOUNDITEM
[19:50:13] [DEBUG:IDIOMA1] KEY[1]: %s нашёл(-ла) %s
[19:50:13] [DEBUG:IDIOMA1] KEY[0]: ITEM3
[19:50:13] [DEBUG:IDIOMA1] KEY[1]: Большая аптечка
Crash again...

Codes from my idioma.inc:

Code:
setMensaje(const idioma[], const key[], const valor[])
{
	new key2[50];
	key2[0] = '\0';
	strcat(key2, key);
	strcat(key2, idioma);
	SetGVarString(key2, valor);
}


getMensajeA(const playerid, const key[], string[], const tamano, va_args<>)
{
	static key2[50];
	static valor[4096];
	string[0] = '\0';
	key2[0] = '\0';
	strcat(key2, key);
	strcat(key2, idiomaJugador[playerid]);
	printf("[DEBUG:IDIOMA0] KEY[0]: %s", key);
	if(strlen(key) > 1)
	{
		GetGVarString(key2, valor);
		va_format(string, tamano, valor, va_start<4>);
		printf("[DEBUG:IDIOMA0] KEY[1]: %s", string);
	}
}
getMensaje(const playerid, const key[])
{
	static key2[50];
	static valor[144];

	key2[0] = '\0';
	strcat(key2, key);
	strcat(key2, idiomaJugador[playerid]);
	printf("[DEBUG:IDIOMA1] KEY[0]: %s", key);
	GetGVarString(key2, valor);
	printf("[DEBUG:IDIOMA1] KEY[1]: %s", valor);
	return valor;
}


Code:
	setMensaje(RUSSIAN, "ITEM1",		"Маленькая аптечка");
	setMensaje(RUSSIAN, "ITEM2",		"Средняя аптечка");
	setMensaje(RUSSIAN, "ITEM3",		"Большая аптечка");
	setMensaje(RUSSIAN, "ITEM4",		"Бензин");
	setMensaje(RUSSIAN, "ITEM5",		"Масло");
	setMensaje(RUSSIAN, "ITEM6",		"Фонарик");
	setMensaje(RUSSIAN, "ITEM7",		"Лекарства");

Code:
 setMensaje(RUSSIAN, "FOUNDITEM",	"%s нашёл(-ла) %s");
__________________
Black Lagoon RPG

Lsa Zombie apocalypse is back with bots !
Blackaslan is online now   Reply With Quote
Old 08/11/2018, 02:01 PM   #2
PawelQ
Big Clucker
 
PawelQ's Avatar
 
Join Date: Jun 2013
Posts: 108
Reputation: 2
Default Re: Russian text is crashing my server

You're using MySQL or what?
PawelQ is offline   Reply With Quote
Old 09/11/2018, 03:15 AM   #3
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 177
Reputation: 9
Default Re: Russian text is crashing my server

Quote:
Originally Posted by PawelQ View Post
You're using MySQL or what?
Yeah , Mysql
__________________
Black Lagoon RPG

Lsa Zombie apocalypse is back with bots !
Blackaslan is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Most active russian server chewyclegnuts General 8 02/11/2016 03:20 PM
[Include] [INC] Russian GameText + Russian Language for GTA-SA [Saint] Релизы/Releases 20 10/02/2015 12:24 PM
Can i post Russian Server in the advertisement section? xXxMofujohnxXx Everything and Nothing 2 10/05/2014 01:34 PM
How to play in Russian server Gianoba General 12 24/04/2014 07:20 PM
[GameMode] Russian •Entertaning• | DM Server Seregamil Релизы/Releases 19 05/10/2012 10:57 AM


All times are GMT. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.