From fb37b0ee4253651cab10b41cc2e1f536b17b26d4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 15 Sep 2024 16:29:45 -0400 Subject: Fix up `if var := ...:` in ternary expressions and optional checking logic --- examples/game/game.tm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/game/game.tm b/examples/game/game.tm index 362eae04..c7020f55 100644 --- a/examples/game/game.tm +++ b/examples/game/game.tm @@ -2,15 +2,15 @@ use libraylib.so use use -use file use ./world.tm -func main(map="map.txt"): +func main(map=(./map.txt)): extern InitWindow:func(w:Int32, h:Int32, title:CString)->Void InitWindow(1600, 900, "raylib [core] example - 2d camera") - map_contents := when read(map) is Success(m): m + map_contents := if contents := map:read(): + contents else: exit(code=1, "Could not find the game map: $map") World.CURRENT:load_map(map_contents) -- cgit v1.2.3