define file error!!!

BlitzMax Forums/BlitzMax Beginners Area/define file error!!!

Caton(Posted 2016) [#1]
file=ReadFile(filename$)
titlename$=ReadLine$(file)
CloseFile(file)

it keeps tell me I have to define file? PLEASE HELP!!!


Brucey(Posted 2016) [#2]
You should probably start with one of the beginner tutorials. They can help with your understanding of the structure and syntax you need to use.

I assume the above example is not your complete program?

I suggest you use Strict or SuperStrict. In which case you need to define you variables with Local or Global. Eg.
Local file:TStream = ...