07.11.2018, 23:59
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 ....... )
Crash again...
Codes from my idioma.inc:
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]: Большая аптечка |
Codes from my idioma.inc:
Код:
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; }
Код:
setMensaje(RUSSIAN, "ITEM1", "Маленькая аптечка"); setMensaje(RUSSIAN, "ITEM2", "Средняя аптечка"); setMensaje(RUSSIAN, "ITEM3", "Большая аптечка"); setMensaje(RUSSIAN, "ITEM4", "Бензин"); setMensaje(RUSSIAN, "ITEM5", "Масло"); setMensaje(RUSSIAN, "ITEM6", "Фонарик"); setMensaje(RUSSIAN, "ITEM7", "Лекарства");
Код:
setMensaje(RUSSIAN, "FOUNDITEM", "%s нашёл(-ла) %s");