Ziggit

Trouble with comptime expressions (opens in new tab)

I am making a board game and am implementing a card system that mutates how board pieces are scored. My confusion comes from my understanding that comptime errors should only be happening if a length is unknown at compile time. In this line p.points[i] = pattern_points[i]; both p.points and pattern_points length should be known at compile time. However, I’m obviously missing something, so I’m hoping someone can point out my error. I’ve been stuck on this one for a while now. // Material Patte...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help