yeah, I was trying that and ran into some trouble with making the fields = follow1, etc. Here:
It doesn't let me run the program, I get runtime error "Expecting 'End Function' "
AppTitle "SW:WRH Conversation creator" Global filename$="" Global launcher$="" Global funcname$="" Global quit=0 Global check$="" Type TQuestion Field question$ Field ans1$ Field ans2$ Field ans3$ Field fol1$ Field fol2$ Field fol3$ End Type Graphics 1280,1024,32,2 ;createconversation ;create the conversation Text 1, 1, "WELCOME TO THE SW:WRH CONVERSATION CREATOR. FOLLOW GIVEN INSTRUCTIONS. TYPE 'quit' AT ANY TIME TO QUIT WITHOUT SAVING YOUR CONVERSATION. HIT ANY KEY TO CONTINUE" WaitKey() Cls filename$=Input$("What should the filename of this conversation be (if the file already exhists, put its name here too, extensions are unnecesary)? ") + ".bb" check(filename$) If quit=1 Then Goto quitlabel funcname$=Input$("What would you like the Function name For this conversation To be? ") check(funcname$) If quit=1 Then Goto quitlabel Global initquestion$ = Input$("What should the First thing the NPC says be? ") GetQuestion$(initquiestion$) writetofile Cls .quitlabel End Function check(check$) If check$="quit" Then quit=1 ;Goto quitlabel ;EndIf End Function Function writetofile() test = FileType(filename$) ;if it doesn't If Not test Then ;createfile file = WriteFile(filename$) ;if it does Else ;open file file = OpenFile(filename$) ;seek to end of file SeekFile file, FileSize(filename$) End If ;======================================================TO BE CHANGED================================ WriteLine file, "" WriteLine file, "Function " + funcname$ + "()" WriteLine file, "npc1$ = " + Chr(34) + npc1$ + Chr(34) WriteLine file, "r1$ = " + Chr(34) + r1$ + Chr(34) WriteLine file, "Repeat" WriteLine file, "UpdateWorld" WriteLine file, "RenderWorld" WriteLine file, "Flip()" WriteLine file, "If (MouseY() < ((displayheight/4)*3)+((displayheight/4)*.3) + 12) And MouseY() > ((displayheight/4)*3)+((displayheight/4)*.3) Then" WriteLine file, "Color 50, 50, 245" WriteLine file, "Rect 0, ((displayheight/4)*3)+((displayheight/4)*.3), displaywidth, 12, 1" WriteLine file, "Color 255, 255, 255" WriteLine file, "EndIf" WriteLine file, "Color 0,0,0" WriteLine file, "Rect 0,0,displaywidth,displayheight/4,1" WriteLine file, "Color 0,0,0" WriteLine file, "Rect 0,(displayheight/4)*3,displaywidth,displayheight/4,1" WriteLine file, "Color 255, 255, 255" ;HIGHLIGHTS======================== WriteLine file, "If (MouseY() < ((displayheight/4)*3)+((displayheight/4)*.3) + 12) And MouseY() > ((displayheight/4)*3)+((displayheight/4)*.3) Then" WriteLine file, "Color 50, 50, 245" WriteLine file, "Rect 0, ((displayheight/4)*3)+((displayheight/4)*.3), displaywidth, 12, 1" WriteLine file, "Color 255, 255, 255" WriteLine file, "EndIf" WriteLine file, "If (MouseY() < ((displayheight/4)*3)+((displayheight/4)*.3) + 12 +50) And MouseY() > ((displayheight/4)*3)+((displayheight/4)*.3)+50 Then" WriteLine file, "Color 50, 50, 245" WriteLine file, "Rect 0, ((displayheight/4)*3)+((displayheight/4)*.3)+50, displaywidth, 12, 1" WriteLine file, "Color 255, 255, 255" WriteLine file, "EndIf" WriteLine file, "If (MouseY() < ((displayheight/4)*3)+((displayheight/4)*.3)+12+100) And MouseY() > ((displayheight/4)*3)+((displayheight/4)*.3)+100 Then" WriteLine file, "Color 50, 50, 245" WriteLine file, "Rect 0, ((displayheight/4)*3)+((displayheight/4)*.3)+100, displaywidth, 12, 1" WriteLine file, "Color 255, 255, 255" WriteLine file, "EndIf" ;==================================== WriteLine file, "Text 250,100, " + Chr(34) + npc1$ + Chr(34) WriteLine file, "Text 250,((displayheight/4)*3)+((displayheight/4)*.3), " + Chr(34) + r1$ + Chr(34) WriteLine file, "Text 250,((displayheight/4)*3)+((displayheight/4)*.3)+50, " + Chr(34) + r2$ + Chr(34) WriteLine file, "Text 250,((displayheight/4)*3)+((displayheight/4)*.3)+100, " + Chr(34) + r3$ + Chr(34) WriteLine file, "Until KeyHit(1)" WriteLine file, ".endconv" WriteLine file, "End Function" ;======================================================TO BE CHANGED================================ CloseFile file End Function Function GetQuestion$(q$) Print Print "-----------------" Print Print "Please enter answers that can be given for" Print "this question: " + q$ a1$ = Input (" answer1=") follow1$ = Input$(" followed by=") a2$ = Input (" answer2=") follow2$ = Input$(" followed by=") a3$ = Input (" answer3=") follow3$ = Input$(" followed by=") q.TQuestion = New TQuestion q/question$ = q$ q/ans1$ = a1$ q/ans2$ = a2$ q/ans3$ = a3$ q/fol1$ = follow1$ q/fol2$ = follow2$ q/fol3$ = follow3$ If follow1$ <> "" Then GetQuestion$(follow1$) If follow2$ <> "" Then GetQuestion$(follow2$) If follow3$ <> "" Then GetQuestion$(follow3$) End Function
It doesn't let me run the program, I get runtime error "Expecting 'End Function' "