It sounds to me that you need some form of loading function, something that loads only the data needed for that particular character. The Include statement is not what you need. Like everyone else has been trying to tell you, Include is a copy/paste operation from another file into your sourcecode. Basically, what you're trying to do is compile your program so that when it runs it gets compiled with only the info for the one character.
It's like trying to build a one-piece screwdriver that can unscrew slotted, hex, phillips, and any other screw you have - and have only one bit.
It doesn't work. You build it to work with one screw and it won't work with other kinds. What you need is replaceable bits for your screwdriver depending on the screw you're using.
In other words, you need data files that you load depending on what character is needed:
Pick character
...
LoadData("Character Data "+character_number+".dat")
...
Main Program code here
...
Function LoadData(filename$)
file=OpenFile(filename$)
Repeat
;This loop removes blank line from the parsing process
Repeat
ln$=Trim$(ReadLine$(file))
Until Eof(file) or ln$<>""
Select ln$
Case "control string 1":
ln$=Trim$(Right$(ln$+String$(" ",Len("control string 1")),Len(ln$)))
;Do whatever to the rest of ln$
Case "control string 2":
ln$=Trim$(Right$(ln$+String$(" ",Len("control string 2")),Len(ln$)))
;Do whatever to the rest of ln$
Case "control string 3":
ln$=Trim$(Right$(ln$+String$(" ",Len("control string 3")),Len(ln$)))
;Do whatever to the rest of ln$
End Select
Until Eof(file)
CloseFile file
End Function
Sample Files:
;"Sample File 1.dat"
.Character1
Data "Me, Myself, and I", 456, 21, 1
.Character2
Data "The Little Nobody",12,2,14
.Character3
Data "Sleepy Zzzzzz",321,458,3
;"Sample File 2.dat"
.Character1
Data "Once again", 456, 21, 1
.Character2
Data "Twice now",12,2,14
.Character3
Data "The Third Guy",321,458,3
;"Sample File 3.dat"
.Character1
Data "Me First", 456, 21, 1
.Character2
Data "The First Loser",12,2,14
.Character3
Data "The test",321,458,3
Sample loading function to load this data:
Global Name$, health, mana, weapon
Print "Press a key to choose a file:"
Print " 1) File 1"
Print " 2) File 2"
Print " 3) File 3"
Repeat
If Keyhit(2)
user=1
Exit
EndIf
If Keyhit(3)
user=1
Exit
EndIf
If Keyhit(4)
user=1
Exit
EndIf
Forever
Print
Print
Print "Press a key to choose a Character:"
Print " 1) Character 1"
Print " 2) Character 2"
Print " 3) Character 3"
Repeat
If Keyhit(2)
LoadData(user,1)
Exit
EndIf
If Keyhit(3)
LoadData(user,2)
Exit
EndIf
If Keyhit(4)
LoadData(user,3)
Exit
EndIf
Forever
Print
Print
Print Chr$(34)+name$+Chr$(34)+":"
Print " Health: "+Str$(health)
Print " Mana: "+Str$(mana)
Print " Weapon: "+Str$(weapon)
WaitKey
End
Function LoadData(user,player)
file=OpenFile("Sample File "+user+".dat")
Repeat
;This loop removes blank line from the parsing process
Repeat
ln$=Trim$(ReadLine$(file))
Until Eof(file) or ln$<>""
Select ln$
Case ".Character":
ln$=Trim$(Right$(ln$+String$(" ",Len(".Character")),Len(ln$)))
person=Int(ln$)
Case "Data ":
ln$=Trim$(Right$(ln$+String$(" ",Len("Data")),Len(ln$)))
If person=player
a1=Instr(ln$,Chr$(34))
a2=Instr(ln$,Chr$(34),a1+1)
a3=Instr(ln$,",",a2+1)
a4=Instr(ln$,",",a3+1)
a5=Instr(ln$,",",a4+1)
name$=Mid$(ln$,a1+1,a2-a1-1)
health=Int(Mid$(ln$,a3+1,a4-a3-1))
mana=Int(Mid$(ln$,a4+1,a5-a4-1))
weapon=Int(Right$(ln$,Len(ln$)-a5))
EndIf
End Select
Until Eof(file)
CloseFile file
End Function