From 835eb7e89627eea923bfd57bdacba7065c6b1d4c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 15 Sep 2024 16:42:42 -0400 Subject: Add optional:or_exit(...) --- examples/game/game.tm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'examples/game') diff --git a/examples/game/game.tm b/examples/game/game.tm index c7020f55..8c5124d0 100644 --- a/examples/game/game.tm +++ b/examples/game/game.tm @@ -9,9 +9,7 @@ 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 := if contents := map:read(): - contents - else: exit(code=1, "Could not find the game map: $map") + map_contents := map:read():or_exit("Could not find the game map: $map") World.CURRENT:load_map(map_contents) -- cgit v1.2.3