ok i have this problem
i have some hundred lines of code where i would like to move the part that comes before the main loop into a subroutine.
the setup part contains definitions for the user defined variables and it defines some variables as those.
now when my code looks like this:
gosub _setup:
do
do something with the defined variables
loop
_setup:
define them
return
it reports an error that says that the variables that should have been defined are not defined. ( variable p does not exist )
it works perfectly fine when i do it without the gosub
i have many other working subroutines inside the loop
I have quad checked for spelling mistakes int the gosub and put stuff like wait key into them but it doesnt even seem to enter the sub routines!
here is a piece of code that reports the error for me

sync rate 60
gosub _setup:
do
dot p.x,p.y
sync : cls
LOOP
_setup:
type UDT
x as integer
y as integer
endtype
x = 500
y =200
return
[/code]
help appreciated[code]Rem Project: Dark Basic Pro Project
Rem Created: Sunday, October 02, 2011
Rem ***** Main Source File *****