HELP WITH THIS TEXBOX SYSTEM!!!

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By X

I NEED CRITICAL HELP!
I made a game for a Jam using this SMRT system: GitHub - brunosxs/SMRT-Godot: SMRT-Godot - System for Multi Rethorical Texts for Godot is a dialog system with a fancy name

Everything was fine, till i exported the game because the textbox doesn’t display at all, and in the debug there’s this message:

SCRIPT ERROR: show_text: Invalid call. Nonexistent function 'has' in base 'Nil'.
          At: res://addons/SMRT/dialog.gdc:187

¡¡¡PLEASE I NEED HELP, THE JAM IS IN 3 DAYS!!!

:bust_in_silhouette: Reply From: estebanmolca

Looking a bit at the code in dialog.gd.

is this path correct? I mean, does that file exist in that path?:
"res://addons/SMRT/example.lan"
or did you assign another file in:
export (String, FILE, "*.lan") var language = "res://addons/SMRT/example.lan"
that variable is assigned in _ready () with:
language = load_language(language)
and the function:

func load_language(lang_file="res://addons/SMRT/example.lan"):
	var file = File.new()
	if lang_file == null:
		lang_file = "res://addons/SMRT/example.lan"
	#Check for and load the language file
	if (file.open(lang_file,File.READ) == OK):
		if show_debug_messages:
			print("Found dialog file" , lang_file)
		var temp_lang = file.get_as_text()
		var dictionary = {}
		dictionary = JSON.parse(temp_lang)
		if typeof(dictionary.result) == TYPE_DICTIONARY:
			return dictionary.result
		else:
			if show_debug_messages:
				print("Error loading dialog file")
			return

set this variable to true and see if any other error occurs:
export var show_debug_messages = false

Hi, thank you for reply my question.
Yes the file example.lan exist and also yes i did assign this another one:

res://addons/SMRT/Lenguages/English.lan

I also set that show_debug_messages to true and ejecute it in the engine, this was the result:

    --- Debugging process started ---
Godot Engine v3.3.2.stable.official - https://godotengine.org
OpenGL ES 3.0 Renderer: Intel(R) UHD Graphics 600
OpenGL ES Batching: ON
 
Found dialog fileres://addons/SMRT/Lenguages/English.lan
VIEWPORT RECTANGLE (288, 216)
Face sprites file not found
{Adios:{Kilos:[{answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:Creo que puedes ir diciendole adios a esos kilitos de mas., typewriter:True, typewriter_speed:0.05}, {answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:Haha., typewriter:True, typewriter_speed:0.05}, {answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:Quiza el esqueleto te ayude..., typewriter:True, typewriter_speed:0.05}]}, Ahi:{Vienen:[{answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:¡Oh no, ahi vienen!, typewriter:True, typewriter_speed:0.05}, {answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:¡Tienes que hacer algo!, typewriter:True, typewriter_speed:0.05}]}, Ancho:{Demasiado:[{answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:¡Cuidado muchacho!, typewriter:True, typewriter_speed:0.05}, {answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:No quieres ser "demaciado largo" del otro lado. Haha., typewriter:True, typewriter_speed:0.05}]}, Bueno:{Ya:[{answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:Bueno... Ese fue el ultimo..., typewriter:True, typewriter_speed:0.05}, {answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:¡Ha sido todo un expectaculo!, typewriter:True, typewriter_speed:0.05}, {answers:[...], beep:True, beep_pitch:1, enable_question:False, face_frame:0, face_position:0, frame_position:2, text:No puedo creer que te los comiste todos..., typewriter:True, typewriter_speed:0.05}, {answers:[...], beep:True, beep_pitch:1, enable_question:False, face_[...]
 [output overflow, print less text!]
Playing beep
Playing beep
Playing beep
Playing beep
Playing beep
Playing beep
Playing beep
Playing beep
Playing beep
Playing beep
Playing beep
Finished text display
--- Debugging process stopped ---
Set language

I do really appreciate your help. Idk what I’m gonna do if i don’t fix this on time…

X | 2021-08-28 03:38

something similar happened to this user:
and according to, he solved it by re-importing smrt:
Problems with show_text() (Edit: just reimported smrt and it worked) · Issue #21 · brunosxs/SMRT-Godot · GitHub

In the addon wiki it says this:
FAQ · brunosxs/SMRT-Godot Wiki · GitHub

…You can do that in the export configuration, under the “Resources”
tab…

Android · Issue #2 · brunosxs/SMRT-Godot · GitHub

If it still fails, check that your English.lan is well formatted. As a last option you can test the project in an older version of godot.

estebanmolca | 2021-08-28 09:39

OMG I CAN’T BELIVE IT WORKED. DUDE U ARE MY HERO <3
GIVE ME UR NAME I SWEAR I PUT U IN THE CREDITS!

X | 2021-08-28 14:22

What was the problem? Thanks you can use the nick I have here xd. And I would like to test the game when you publish it. What -jam- are you participating in?

estebanmolca | 2021-08-28 15:12

The problem was that Godot was not exporting the .lan file. But it’s already solved. :smiley:
And about the jam, I’m participating in a spanish jam which topic is “too long”, so I’m afraid u will not understand my game, but if u still wanna give it a try, here is:

X | 2021-08-29 15:58

Lo estoy probando, se ve muy bien y me parece muy original la mecánica de la espada, al menos es la primera vez que veo algo así en un juego, pero no puedo subir arriba en la parte donde ahí una cueva debajo. Intente de varias formas, siguiendo la sombra que aparece por detrás pero nada no puedo. Ahora entiendo por que me decías que no lo iba a entender jaja. Igual como consejo, eso puede hacer que cualquier jugador con poca paciencia termine cerrando el juego. Voy a seguir intentando y te comento

estebanmolca | 2021-08-29 21:25

Ohh hablas expañol :smiley: genial!
Graciaas por tu critica del juego, la usare para mejorar. Ah y en la parte de la cueva tienes que comerte los hongos. Por cierto acabo de subir una pequeña actualización del juego. :smiley:

X | 2021-08-30 16:46