Exported game does not run. AutoLoad and const error?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sciencetourist
:warning: Old Version Published before Godot 3 was released.

Hello,

i tried to export my game to Windows and HTML and both versions do not run.
When i run it from the editor everything is fine. What is the difference there?

On HTML i can get the following errors:
enter image description here

TILE_SIZE is a const on an AutoLoad script called “game” and is used by my world node trough onready var game = get_node("/root/game")
When game.TILE_SIZE is called the error occurs.
Is there anything wrong with this?

Any other error in the log? (scroll up to find the first errors, sometimes they cause the next ones)

Zylann | 2017-10-24 19:04

I renamed the script from “game” to “Game”, that caused this error.
But is it strange that the editor was working with that and exporting created errors. Maybe something is cached there.

sciencetourist | 2017-10-25 09:14