Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using int instead of int32 when calling Raylib functions? #102

Closed
X-Ninja-dev opened this issue Feb 19, 2024 · 2 comments
Closed

using int instead of int32 when calling Raylib functions? #102

X-Ninja-dev opened this issue Feb 19, 2024 · 2 comments

Comments

@X-Ninja-dev
Copy link

X-Ninja-dev commented Feb 19, 2024

This is a general Nim question and not specific to Naylib so feel free to delete and send me to the forums instead

Using a tuple in the code I have to declare the values as int32, why is that? And is there a way to tell the compiler to use int32?

import raylib
const
  screenW = 800
  screenH = 600
  screenSize = (x: 800, y: 600)

proc main(): void =
  # works
  initWindow(screenW, screenH, "testing")

  # does not work. Error: type mismatch
  initWindow(screenSize.x, screenSize.y, "testing")

main()
@Angluca
Copy link

Angluca commented Mar 4, 2024

screenSize.x.int32

@planetis-m
Copy link
Owner

No idea really, const implicit types buffle me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants