0 votes

I NEED CRITICAL HELP!
I made a game for a Jam using this SMRT system: https://github.com/brunosxs/SMRT-Godot

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!!!

Godot version 3.3.2
in Engine by (73 points)

1 Answer

+1 vote
Best answer

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

by (2,058 points)
selected by

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

something similar happened to this user:
and according to, he solved it by re-importing smrt:
https://github.com/brunosxs/SMRT-Godot/issues/21

In the addon wiki it says this:
https://github.com/brunosxs/SMRT-Godot/wiki/FAQ#the-dialog-doesnt-work-when-exported-what-happened

...You can do that in the export configuration, under the "Resources"
tab...

https://github.com/brunosxs/SMRT-Godot/issues/2

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.

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!

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?

The problem was that Godot was not exporting the .lan file. But it's already solved. :D
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:

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

Ohh hablas expañol :D 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. :D

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.