I have this code:
CharacterCreation:
CharMenuPos# = 0
Repeat
If ReturnKey() = 1
If CharMenuPos# = 0
Class$ = "Fighter"
Level# = 1
Hp# = 100
Mp# = 25
Exp# = 0
Strength# = 15
Dexterity# = 10
Fortitude# = 13
Perception# = 13
Intelligence# = 6
Wisdom# = 6
Charisma# = 9
Faith# = 8
Speed# = 5
Combo# = 3
Ranged# = 2
EndIf
If CharMenuPos# = 1
Class$ = "Knight"
Level# = 1
Hp# = 120
Mp# = 25
Exp# = 0
Strength# = 12
Dexterity# = 6
Fortitude# = 18
Perception# = 10
Intelligence# = 8
Wisdom# = 6
Charisma# = 11
Faith# = 9
Speed# = 3
Combo# = 2
Ranged# = 1
EndIf
If CharMenuPos# = 2
Class$ = "Wizard"
Level# = 1
Hp# = 50
Mp# = 80
Exp# = 0
Strength# = 6
Dexterity# = 10
Fortitude# = 6
Perception# = 8
Intelligence# = 17
Wisdom# = 14
Charisma# = 11
Faith# = 9
Speed# = 3
Combo# = 1
Ranged# = 1
EndIf
If CharMenuPos# = 3
Class$ = "Rogue"
Level# = 1
Hp# = 70
Mp# = 40
Exp# = 0
Strength# = 8
Dexterity# = 16
Fortitude# = 6
Perception# = 14
Intelligence# = 10
Wisdom# = 8
Charisma# = 12
Faith# = 6
Speed# = 8
Combo# = 5
Ranged# = 3
EndIf
If CharMenuPos# = 4
Class$ = "Priest"
Level# = 1
Hp# = 40
Mp# = 90
Exp# = 0
Strength# = 5
Dexterity# = 6
Fortitude# = 5
Perception# = 11
Intelligence# = 15
Wisdom# = 15
Charisma# = 8
Faith# = 15
Speed# = 3
Combo# = 1
Ranged# = 1
EndIf
If CharMenuPos# = 5
Class$ = "Sorcerer"
Level# = 1
Hp# = 60
Mp# = 60
Exp# = 0
Strength# = 6
Dexterity# = 10
Fortitude# = 6
Perception# = 12
Intelligence# = 14
Wisdom# = 17
Charisma# = 8
Faith# = 7
Speed# = 4
Combo# = 2
Ranged# = 1
EndIf
If CharMenuPos# = 6
Class$ = "Barbarian"
Level# = 1
Hp# = 80
Mp# = 35
Exp# = 0
Strength# = 16
Dexterity# = 12
Fortitude# = 10
Perception# = 10
Intelligence# = 6
Wisdom# = 6
Charisma# = 9
Faith# = 9
Speed# = 6
Combo# = 4
Ranged# = 2
EndIf
If CharMenuPos# = 7
Class$ = "Cleric"
Level# = 1
Hp# = 90
Mp# = 50
Exp# = 0
Strength# = 10
Dexterity# = 6
Fortitude# = 13
Perception# = 8
Intelligence# = 6
Wisdom# = 14
Charisma# = 8
Faith# = 13
Speed# = 4
Combo# = 2
Ranged# = 1
EndIf
If CharMenuPos# = 8
Class$ = "Prophet"
Level# = 1
Hp# = 40
Mp# = 70
Exp# = 0
Strength# = 6
Dexterity# = 8
Fortitude# = 6
Perception# = 8
Intelligence# = 15
Wisdom# = 12
Charisma# = 11
Faith# = 14
Speed# = 3
Combo# = 1
Ranged# = 1
EndIf
If CharMenuPos# = 9
Class$ = "Hunter"
Level# = 1
Hp# = 100
Mp# = 25
Exp# = 0
Strength# = 6
Dexterity# = 14
Fortitude# = 8
Perception# = 17
Intelligence# = 9
Wisdom# = 8
Charisma# = 9
Faith# = 8
Speed# = 7
Combo# = 2
Ranged# = 4
EndIf
If CharMenuPos# = 10
Class$ = "Warlock"
Level# = 1
Hp# = 50
Mp# = 70
Exp# = 0
Strength# = 6
Dexterity# = 6
Fortitude# = 6
Perception# = 10
Intelligence# = 15
Wisdom# = 15
Charisma# = 8
Faith# = 14
Speed# = 4
Combo# = 2
Ranged# = 1
EndIf
If CharMenuPos# = 11
Class$ = "Bard"
Level# = 1
Hp# = 70
Mp# = 50
Exp# = 0
Strength# = 9
Dexterity# = 13
Fortitude# = 7
Perception# = 12
Intelligence# = 8
Wisdom# = 8
Charisma# = 16
Faith# = 7
Speed# = 5
Combo# = 2
Ranged# = 2
EndIf
If CharSlot# = 1
Make File "CHAR\Hero1.dat"
Open To Write 1, "CHAR\Hero1.dat"
EndIf
If CharSlot# = 2
Make File "CHAR\Hero2.dat"
Open To Write 2, "CHAR\Hero2.dat"
EndIf
If CharSlot# = 3
Make File "CHAR\Hero3.dat"
Open To Write 3, "CHAR\Hero3.dat"
EndIf
If CharSlot# = 4
Make File "CHAR\Hero4.dat"
Open To Write 4, "CHAR\Hero4.dat"
EndIf
If CharSlot# = 5
Make File "CHAR\Hero5.dat"
Open To Write 5, "CHAR\Hero5.dat"
EndIf
If CharSlot# = 6
Make File "CHAR\Hero6.dat"
Open To Write 6, "CHAR\Hero6.dat"
EndIf
If CharSlot# = 7
Make File "CHAR\Hero7.dat"
Open To Write 7, "CHAR\Hero7.dat"
EndIf
If CharSlot# = 8
Make File "CHAR\Hero8.dat"
Open To Write 8, "CHAR\Hero8.dat"
EndIf
write string CharSlot#,Class$
write float CharSlot#,Level#
write float CharSlot#,Hp#
write float CharSlot#,Mp#
write float CharSlot#,Exp#
write float CharSlot#,Strength#
write float CharSlot#,Dexterity#
write float CharSlot#,Fortitude#
write float CharSlot#,Perception#
write float CharSlot#,Intelligence#
write float CharSlot#,Wisdom#
write float CharSlot#,Charisma#
write float CharSlot#,Faith#
write float CharSlot#,Speed#
write float CharSlot#,Combo#
write float CharSlot#,Ranged#
Close file CharSlot#
CharacterCreated# = 1
Repeat
Until ReturnKey() = 0
Goto CharacterSelect:
EndIf
It's creating the files, so I know that CharSlot# is being recognized properly, and through a visual displayed in the rest of the code I know that CharMenuPos# is becoming the corresponding numbers, but for some reason, properly named files are created, but nothing gets written to them.
Please help.
Solo Game Dev
DBPro User