I finally got the answer. If you want to make a public variable you have to specify that in its module, and then specify its type and its 'extrn' status in the main file. If the variable is of struc type you have to copy and paste the definition of the structure.
For example, in a file called "aux.asm" we'll have 2 variables that we'll use in "main.asm"
so the thing would go like this:
aux.asm:
Title aux
.model small
;parts of the player's ship
play1 struc
playX db ?
playY db 25
alive db 1
ends
;this is the player
plyr struc
Lplay1 <38,,,>
Cplay1 <39,,,>
Rplay1 <40,,,>
Front play1 <39,24,,>
lives db 2
ship db 202
score dw 0
ends
.data
me plyr <>
rand db ?
;making those variables public
public me
public rand
main.asm:
Title main file
.model small
.stack
; we need to include the struc definitions so the assembler knows how to deal
;with "me"
;parts of the player's ship
play1 struc
playX db ?
playY db 25
alive db 1
ends
;this is the player
plyr struc
Lplay1 <38,,,>
Cplay1 <39,,,>
Rplay1 <40,,,>
Front play1 <39,24,,>
lives db 2
ship db 202
score dw 0
ends
.data
extrn me :plyr
extrn rand :byte
.code
...