How do you return a type from a function? I tryied this but it doesnt work. I get an "Illegal Type Conversion" error when compiling.
I get the error where the function returns the varible. Is there anyway to return the a.alien that I create in the function to be used in the main program?
Type alien Field x,y End type a.alien=randalien() Print a\x Print a\y Waitkey() End Function randalien() a.alien=New alien a\x=Rand(0,100) a\y=Rand(0,100) Return a.alien End Function
I get the error where the function returns the varible. Is there anyway to return the a.alien that I create in the function to be used in the main program?