GAH!! MY BRAIN HURTS!

Blitz3D Forums/Blitz3D Beginners Area/GAH!! MY BRAIN HURTS!

I think you should then use ReadFile/WriteFile to include variable data, like this:
;Delete Each TQuestion <-- delete possible existing questions
a$ = "Conversation12.dat"
ff = ReadFile(a$)
While Not(Eof(ff))

   q.TQuestion = New TQuestion
   q\question$ = ReadLine(ff)
   ..etc

Wend
Closefile ff


You could however also use Read&Data.
With the Restore command, you can determine where Read should start reading data. Using a Select..Case structure, you can use a variable to Restore to the right label.

I'm not sure if you're familiair with the Data command ?
Here is an example:
number = Input ("Which question ? (1, 2, 3) :")

Select number

	Case 1
		Restore label1
	Case 2
		Restore label2
	Case 3
		Restore label3

End Select

Read question$
Read answer1$
Read answer2$

Print "--------------------------"
Print question$
Print "--------------------------"
Print "1." + answer1$
Print "2." + answer2$

WaitKey()
End



.label1
Data "How are you?"
Data "I'm fine"
Data "I'm not so good"

.label2
Data "What is your name?"
Data "I am Dave"
Data "I am Miranda"

.label3
Data "Do you have a pet"
Data "Yes, a cat"
Data "Yes, a dog"
[/code]You could also use Select..Case with strings:[codebox]
a$ = "hello"

Select a$

	Case "hello"
		Print "a string was 'hello'"
		
	Case "bye"
		Print "a string was 'bye'"
		
	Default
		Print "a string was something else"
		
End Select

Delay 2260
End

And about Types, you can include Types whereever you like in the program, but they should appear before they are used.
So, if you're using them in an Included file, and you want to define them in the main program, they should appear before the Include command.