Godot: V2.1.2 Ternary crashes exported exe

Created on 2 Feb 2017  ·  3Comments  ·  Source: godotengine/godot

Operating system or device - Godot version:
Win 7 (x64) desktop
Godot v2.1.2

Issue description:
The use of the ternary operator causes the exported .exe to crashes. The applications runs perfectly fine when in editor but not when exported.
The export debug reports the following error:

SCRIPT ERROR: GDScript::load_byte_code: Parse Error: Expected end of statement (var)
At: res://TernaryTest.gdc :6
Error: GDScript::load_byte_code: Method/Function Failed, returning: ERR_PARSE_ERROR
At: modules\gdscript\gd_script.cpp:720

Steps to reproduce:

  1. Use the ternary operator in your code i.e. var frame = 0 if (!challenge.unlocked) else 1
  2. Export project
  3. Run exported project

Link to minimal example project:
Test project

archived

Most helpful comment

@gonzo191 did you update export templates also?

All 3 comments

@gonzo191 did you update export templates also?

@volzhs OK it works now. I was not aware I had to do that.

That's one reason to use the Steam version, it'll update the export templates along with everything else.

Was this page helpful?
0 / 5 - 0 ratings