Hello there. I am getting a really confusing error message.
"Error: attempting to call undeclared routine: 'pos='"
when doing this (shortened down to relevant bits, code is based on nico
examples):
main.nim
import types
proc newPlayer(x,y: int): Player =
result = new(Player)
result.pos = vec2i(x, y)
Run
types.nim
import nico/vec
type
GameObject* = ref object of RootObj
pos: Vec2i
Player* = ref object of GameObject
dir: int
Run
So, the types are being imported, bit it struggles with the "nested" type
imports? If I add the types inside the main file, it works as expected. I have
tried to export the Vec2i type in tyes.nim, bit it doesn't help. What am I
doing wrong?