Skip to content

Commit 4e26580

Browse files
authored
Update modules.md (#32)
following along with the code snippets results in an easily avoidable but confusing error as we call .main in app without declaring the system later. I have added the declaration into the relevant area of the page
1 parent cb669ea commit 4e26580

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/object/modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ There is only ever one _instance_ of a module in a program, so these are _effect
9494
Similar to how we declared `pub const mach_module = .foo_name;`, a module can declare that it has _systems_ with specific names:
9595

9696
```zig
97-
pub const mach_systems = .{ .init, .tick, .deinit };
97+
pub const mach_systems = .{ .main, .init, .tick, .deinit };
9898
```
9999

100-
In this case, our module declared that it has systems called `.init`, `.tick`, and `.deinit` - these are just made up names (we're _declaring them_) - we can name them whatever we like.
100+
In this case, our module declared that it has systems called `.main`, `.init`, `.tick`, and `.deinit` - these are just made up names (we're _declaring them_) - we can name them whatever we like.
101101

102102
Systems are ultimately just functions (or lists of functions) that _could_ be run if someone wants them to. They don't do anything by default.
103103

0 commit comments

Comments
 (0)