this has had me confused for the past couple of days, i swore i would work it out myself but can't.
alright, there's two source codes, one making and saving the array, the other DIMing a array and loaded the saved into it.
these are pretty long.
the making/saving:
DIM Races$(9,2)
Races$(0,0)="Human" `Race
Races$(0,1)="Human" `RName
Races$(1,0)="Elf" `Race
Races$(1,1)="Elven" `RName
Races$(2,0)="Dwarf" `Race
Races$(2,1)="Dwarven" `RName
Races$(3,0)="Troll" `Race
Races$(3,1)="Trollish" `RName
Races$(4,0)="Goblin" `Race
Races$(4,1)="Goblin" `RName
Races$(5,0)="Orc" `Race
Races$(5,1)="Orcish" `RName
Races$(6,0)="Gnoll" `Race
Races$(6,1)="Gnolven" `RName
Races$(7,0)="Amphynite"`Race
Races$(7,1)="Amphbish" `RName
Races$(8,0)="Orge" `Race
Races$(8,1)="Orgen" `RName
DIM Races(9,17)
`Human
Races(0,0)=20 `THP
Races(0,1)=0 `TMP
Races(0,2)=8 `Size
Races(0,3)=8 `Wgt
Races(0,4)=0 `Cash
Races(0,5)=4 `Con
Races(0,6)=4 `Str
Races(0,7)=4 `Dex
Races(0,8)=4 `Wis
Races(0,9)=3 `Luck
Races(0,10)=3 `RAtt
Races(0,11)=3 `LAtt
Races(0,12)=2 `Def
Races(0,13)=5 `MSpd
Races(0,14)=0 `XP
Races(0,15)=1 `Lvl
Races(0,16)=10 `ChPt
`Elf
Races(1,0)=15 `THP
Races(1,1)=0 `TMP
Races(1,2)=6 `Size
Races(1,3)=6 `Wgt
Races(1,4)=0 `Cash
Races(1,5)=2 `Con
Races(1,6)=3 `Str
Races(1,7)=6 `Dex
Races(1,8)=7 `Wis
Races(1,9)=3 `Luck
Races(1,10)=5 `RAtt
Races(1,11)=5 `LAtt
Races(1,12)=1 `Def
Races(1,13)=8 `MSpd
Races(1,14)=0 `XP
Races(1,15)=1 `Lvl
Races(1,16)=10 `ChPt
`Dwarf
Races(2,0)=30 `THP
Races(2,1)=0 `TMP
Races(2,2)=4 `Size
Races(2,3)=8 `Wgt
Races(2,4)=0 `Cash
Races(2,5)=8 `Con
Races(2,6)=6 `Str
Races(2,7)=3 `Dex
Races(2,8)=5 `Wis
Races(2,9)=3 `Luck
Races(2,10)=7 `RAtt
Races(2,11)=7 `LAtt
Races(2,12)=5 `Def
Races(2,13)=2 `MSpd
Races(2,14)=0 `XP
Races(2,15)=1 `Lvl
Races(2,16)=10 `ChPt
`Troll
Races(3,0)=25 `THP
Races(3,1)=0 `TMP
Races(3,2)=5 `Size
Races(3,3)=5 `Wgt
Races(3,4)=0 `Cash
Races(3,5)=3 `Con
Races(3,6)=4 `Str
Races(3,7)=4 `Dex
Races(3,8)=3 `Wis
Races(3,9)=3 `Luck
Races(3,10)=6 `RAtt
Races(3,11)=6 `LAtt
Races(3,12)=4 `Def
Races(3,13)=5 `MSpd
Races(3,14)=0 `XP
Races(3,15)=1 `Lvl
Races(3,16)=10 `ChPt
`Goblin
Races(4,0)=15 `THP
Races(4,1)=0 `TMP
Races(4,2)=4 `Size
Races(4,3)=4 `Wgt
Races(4,4)=0 `Cash
Races(4,5)=2 `Con
Races(4,6)=4 `Str
Races(4,7)=7 `Dex
Races(4,8)=4 `Wis
Races(4,9)=3 `Luck
Races(4,10)=4 `RAtt
Races(4,11)=4 `LAtt
Races(4,12)=3 `Def
Races(4,13)=6 `MSpd
Races(4,14)=0 `XP
Races(4,15)=1 `Lvl
Races(4,16)=10 `ChPt
`Orc
Races(5,0)=25 `THP
Races(5,1)=0 `TMP
Races(5,2)=5 `Size
Races(5,3)=6 `Wgt
Races(5,4)=0 `Cash
Races(5,5)=5 `Con
Races(5,6)=6 `Str
Races(5,7)=3 `Dex
Races(5,8)=4 `Wis
Races(5,9)=3 `Luck
Races(5,10)=5 `RAtt
Races(5,11)=5 `LAtt
Races(5,12)=6 `Def
Races(5,13)=4 `MSpd
Races(5,14)=0 `XP
Races(5,15)=1 `Lvl
Races(5,16)=10 `ChPt
`Gnoll
Races(6,0)=10 `THP
Races(6,1)=0 `TMP
Races(6,2)=4 `Size
Races(6,3)=3 `Wgt
Races(6,4)=0 `Cash
Races(6,5)=2 `Con
Races(6,6)=3 `Str
Races(6,7)=5 `Dex
Races(6,8)=5 `Wis
Races(6,9)=3 `Luck
Races(6,10)=4 `RAtt
Races(6,11)=4 `LAtt
Races(6,12)=3 `Def
Races(6,13)=10 `MSpd
Races(6,14)=0 `XP
Races(6,15)=1 `Lvl
Races(6,16)=10 `ChPt
`Amphynite
Races(0)=15 `THP
Races(1)=0 `TMP
Races(2)=5 `Size
Races(3)=3 `Wgt
Races(4)=0 `Cash
Races(5)=2 `Con
Races(6)=3 `Str
Races(7)=6 `Dex
Races(8)=4 `Wis
Races(9)=3 `Luck
Races(10)=4 `RAtt
Races(11)=4 `LAtt
Races(12)=4 `Def
Races(13)=8 `MSpd
Races(14)=0 `XP
Races(15)=1 `Lvl
Races(16)=10 `ChPt
`Orge
Races(0)=50 `THP
Races(1)=0 `TMP
Races(2)=10 `Size
Races(3)=15 `Wgt
Races(4)=0 `Cash
Races(5)=2 `Con
Races(6)=8 `Str
Races(7)=4 `Dex
Races(8)=4 `Wis
Races(9)=3 `Luck
Races(10)=6 `RAtt
Races(11)=6 `LAtt
Races(12)=5 `Def
Races(13)=3 `MSpd
Races(14)=0 `XP
Races(15)=1 `Lvl
Races(16)=10 `ChPt
Save Array "D:\DARK Basic Pro\Projects\Mystic Battlegrounds\Arrays\Races$.Arr",Races$(9)
Save Array "D:\DARK Basic Pro\Projects\Mystic Battlegrounds\Arrays\Races.Arr",Races(9)
DIMing/Loading:
`Player (P_) variblies.
DIM Player$(24)
P_Name$="Player" : P_Race$="It" : P_RName$="It" : P_Class$="Peasant"
P_RHand$="Fist" : P_RAck$="Punches" : P_RClass$="Hand"
P_LHand$="Fist" : P_LAck$="Punches" : P_LClass$="Hand"
P_Helm$="None" : P_Chest$="Cloth" : P_Waist$="None" : P_Legging$="Cloth"
P_Bracers$="None" : P_Gloves$="None" : P_Boots$="Cloth"
P_Item1$="None" : P_Item2$="None" : P_Item3$="None" : P_Item4$="None"
P_Item5$="None" : P_Item6$="None" : P_Item7$="None" : P_Item8$="None"
DIM Player(39)
P_THP=0 : P_TMP=0 : P_Size=0 : P_Wght=0 : P_Cash=0
P_Con=0 : P_Str=0 : P_Dex=0 : P_Wis=0 : P_Luck=0
P_RDam=1 : P_RWgt=0 : P_RSpd=0 : P_RCls=0 : P_RAtt=0
P_LDam=1 : P_LWgt=0 : P_LSpd=0 : P_LCls=0 : P_LAtt=0
P_HelmA=0 : P_HelmW=0 : P_ChestA=0 : P_ChestW=0
P_WaistA=0 : P_WaistW=0 : P_LeggingA=0 : P_LeggingW=0
P_BraceA=0 : P_BraceW=0 : P_GloveA=0 : P_GloveW=0
P_BootA=0 : P_BootW=0
P_Def=0 : P_MSpd=0
P_XP=0 : P_Lvl=0 : P_ChPt=0
CLS
Input "Please enter your charactors name. ", P_Name$
Player$(0)=P_Name$
CLS
DIM Races$(9,2)
DIM Races(9,17)
Load Array "D:\DARK Basic Pro\Projects\Mystic Battlegrounds\Arrays\Races$.Arr", Races$(9)
Load Array "D:\DARK Basic Pro\Projects\Mystic Battlegrounds\Arrays\Races.Arr", Races(9)
Text 10,10, "Please Select "+Player$(0)+"'s Race."
Text 15,35, "[1]Human [2]Elf [3]Dwarf"
Text 15,55, "[4]Troll [5]Goblin [6]Orc"
Text 15,75, "[7]Gnoll [8]Amphynite [9]Ogre"
Set Cursor 15,95, : Input "", KP$
cls
PR=Val(KP$)-1
Text 10,10, "KP$="+KP$+" PR="+Str$(PR)+"."
Wait key
CLS
Player$(1)=Races$(PR,0)
Player$(2)=Races$(PR,1)
For i=0 to 9
Player(i)=Races(PR,i)
Next i
Player(14)=Races(PR,10)
Player(19)=Races(PR,11)
j=34
For k=12 to 16
Player(j)=Races(PR,k)
Inc j
Next k
Text 10,10, "Name: "+Player$(0)+" Race: "+Player$(1)+" Race Name: "+Player$(2)+"."
Text 10,30, "HP: "+Str$(Player(0))+" MP: "+Str$(Player(1))+" Size: "+Str$(Player(2))+" Weight: "+Str$(Player(3))+" Cash: "+Str$(Player(4))+"."
Text 10,50, "Con: "+Str$(Player(5))+" Str: "+Str$(Player(6))+" Dex: "+Str$(Player(7))+" Wis: "+Str$(Player(8))+" Luck: "+Str$(Player(9))+"."
wait key
the problem i'm having is that when i select 'human' the text commands display (Thx HowDo) "HP: 50 MP: 6" even though the array was saved with "HP: 20 MP: 0".
i'v looked over the code again and again, played with acouple things to see what happens (the arrays saving and loading (9) instead of (0), little things like that that) but couldn't get anything to change.
and i know this project is way over my head, i'v about given up on it again just to skip some steps and start playing with 2D. but i have a hard time setting things down.
any one see something i'm missing?
Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow