y_text: text not found but files are there
#1

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(playeridgLEspanol);
        
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!
Reply
#2

Bump, seems like with so many people claiming to use YSI there should be at least one trying to help
Reply
#3

Bump :/
Reply
#4

I think ****** is only on github now, try ask there.
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)