You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In lib/sdl/src/rect.cr:26:20
26 | def initialize(@x, @y, @w, @h)
^-
Error: instance variable '@x' of SDL::Rect must be Int32, not Float64
I have to change renderer.fill_rect(width / 4, height / 4, width / 2, height / 2)
to renderer.fill_rect((width / 4).to_i, (height / 4).to_i, (width / 2).to_i, (height / 2).to_i)
to have it working.
The text was updated successfully, but these errors were encountered:
My env:
Crystal 1.3.2 (2022-01-18)
LLVM: 13.0.0
Default target: aarch64-apple-darwin21.1.0
I end up with the following error:
I have to change
renderer.fill_rect(width / 4, height / 4, width / 2, height / 2)
to
renderer.fill_rect((width / 4).to_i, (height / 4).to_i, (width / 2).to_i, (height / 2).to_i)
to have it working.
The text was updated successfully, but these errors were encountered: