.TRACK Save Problems
Posted: 13 Mar 2011, 17:25
Hello, It's me again. (Have I asked enough? I just want to learn.)
I am having problems with the following code:
What It's supposed to do:
When used, it saves a .track file with numbers in an array with commas separating them. (So the computer knows what to read)
What It does:
it freezes the NXT, so you have to take the batteries out.
THX,
Dud - 2Labz
I am having problems with the following code:
Code: Select all
void Track(int A[], string Name, int Octave)
{
int I = 0, Z;
string Doc, T, X = ",";
until (A[I] == 0)
{
Z = A[I];
T = NumToStr(Z);
StrCat(Doc, Doc, T, X);
I++;
}
byte handle;
Name = Name + ".track";
DeleteFile(Name);
CreateFile(Name, 300, handle);
int c = 0;
WriteLnString(handle, Doc, c);
CloseFile(handle);
}
When used, it saves a .track file with numbers in an array with commas separating them. (So the computer knows what to read)
What It does:
it freezes the NXT, so you have to take the batteries out.
THX,
Dud - 2Labz