Hello fellow Cemetechians!
I've been trying to update The Oregon Trail CE from ICE 1.0 to ICE 2.0, but am running into some problems. I'm currently working on a new saving system for the game, but can't seem to figure out how ICE's File/Memory functions work
This is what I've got so far:
Code:
As you may notice, I'm trying to store L5 into an appvar called OREFILE. I've looked at snippets from other ICE programs and this is what I came up with, but it doesn't seem to work.
I don't really understand what Pointers, Size, Count, Slot, and Offset refers to in the commands. Any help is appreciated!
I've been trying to update The Oregon Trail CE from ICE 1.0 to ICE 2.0, but am running into some problems. I'm currently working on a new saving system for the game, but can't seem to figure out how ICE's File/Memory functions work
This is what I've got so far:
Code:
[i]Loading
CloseAll
If not(Open("OREFILE","r+"
Open("OREFILE","w+"->XZ
Data(6,0,0,0,0,0,0,0,0,0,0,0,0,0,0)->DATA
Write(DATA,84,1,XZ
End
Read(DATA,84,1,XZ
Copy(L5,DATA,14
L5(1)->OXEN
L5(2)->FOOD
L5(3)->AMMO
L5(4)->PARTS
L5(5)->PACE
L5(6)->RATION
L5(7)->D
L5(8)->E
L5(9)->F
L5(10)->H
L5(11)->K
L5(12)->L
L5(13)->M
L5(14)->T
[i]Saving
OXEN->L5(1)
FOOD->L5(2)
AMMO->L5(3)
PARTS->L5(4)
PACE->L5(5)
RATION->L5(6)
D->L5(7)
E->L5(8)
F->L5(9)
H->L5(10)
K->L5(11)
L->L5(12)
M->L5(13)
T->L5(14)
CloseAll
If not(Open("OREFILE","r+
Open("OREFILE","w+"->XZ
Data(6,0,0,0,0,0,0,0,0,0,0,0,0,0,0->DATA
Write(DATA,84,1,XZ
End
Copy(DATA,L5,14
Write(DATA,84,1,XZ
SetArchiveStatus(1,XZ
CloseAll
As you may notice, I'm trying to store L5 into an appvar called OREFILE. I've looked at snippets from other ICE programs and this is what I came up with, but it doesn't seem to work.
I don't really understand what Pointers, Size, Count, Slot, and Offset refers to in the commands. Any help is appreciated!