y_text: text not found but files are there - 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: y_text: text not found but files are there (
/showthread.php?tid=638031)
y_text: text not found but files are there -
Graber - 25.07.2017
I followed up everything as instructed but for some reason y_text can't read the text and, to top it, stucks in some kind of infinite loop that freezes the server, only option to pkill -9 samp03svr.
Directory structure
Код:
- gamemodes
|
|- TDM.amx
- scriptfiles
|
|- YSI
|- mensajes_LANG_DATA.yml
|- text
|
|- mensajes.ES
|- mensajes.EN
Loading text:
PHP код:
new
Language:gLEspanol,
Language:gLEnglish;
loadtext mensajes[todoxd];
public OnGameModeInit()
{
gLEnglish = Langs_Add("ES", "Espaсol");
gLEnglish = Langs_Add("EN", "English");
}
public OnPlayerConnect(playerid)
{
Langs_SetPlayerLanguage(playerid, gLEspanol);
Text_MessageBox(playerid,using callback DialogIdiomaR, $TITULO_SELECCION_IDIOMA, $SELECCION_IDIOMA, $IDIOMA_ESPAСOL, $IDIOMA_INGLES);
I know you are able to complain that "line X is missing" so I will give you the full example GM:
TDM.pwn:
https://pastebin.com/UuDA0KrE
mensajes.EN:
https://pastebin.com/jcxZb3h1
mensajes.ES
https://pastebin.com/rCPVdrNt
I have a macro for "Text_DialogBox" that will add "using callback" so I don't have to type it again and again and again.
Result (log):
Код:
[15:40:41] Text_Render: Loop: p = 14, llen = 49, output = "Text Not Found"
[15:40:41] Text_Render: Final render?
[15:40:41] Text_Render: Yes!
[15:40:41] Text_Render: p = 14, output = "Text Not Found"
[15:40:41] 00000054 = T
[15:40:41] 00000065 = e
[15:40:41] 00000078 = x
[15:40:41] 00000074 = t
[15:40:41] 00000020 =
[15:40:41] 0000004E = N
[15:40:41] 0000006F = o
[15:40:41] 00000074 = t
[15:40:41] 00000020 =
[15:40:41] 00000046 = F
[15:40:41] 0000006F = o
[15:40:41] 00000075 = u
[15:40:41] 0000006E = n
[15:40:41] 00000064 = d
[15:40:41] Text_Render end
[15:40:41] Text_GetText: loop1 mode_text:all 0 -1 mode_text:all 109
Last line of the log repeats flooding the server log until I kill the server.
I simply don't know what went wrong there. I'm trying to use this because it's the only implemented way to switch languages but I keep encountering nonsense like this. Please help!
Re: y_text: text not found but files are there -
Graber - 26.07.2017
Bump, seems like with so many people claiming to use YSI there should be at least one trying to help
Re: y_text: text not found but files are there -
Graber - 27.07.2017
Bump :/
Re: y_text: text not found but files are there -
OneDay - 27.07.2017
I think ****** is only on github now, try ask there.
Re: y_text: text not found but files are there -
Graber - 01.08.2017
Quote:
Originally Posted by RIDE2DAY
Why did you put $IDIOMA_ESPAСOL on Text_MessageBox when you defined it as IDIOMA_ESPANOL inside the text files? Try changing the С to N.
|
I would make sense since that IS called on player connection, but nope, still the exact same thing.