PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Saving a file into packer

i tried :

ClassEStd::StrCpy(fname, shared->ecd->dat->currentpath);
ClassEStd::StrCat(fname, "datas.epk");

if (ef.Open(fname))
{
if (ef.PackAuthorize(0))
{
if (ef.PackSearchFile("hiscore.dat", fileid))
{
if (ef.PackGetFileData(filedata, filedatasize, fileid) == E_OK)
{
ClassEMemory::Copy(filedata, &shared-;>hiscoresetting, filedatasize);

ef.PackAddFileData("hiscore.dat", filedata, filedatasize, true);

ClassEMemory::DeAlloc(filedata);
}
}
}
}

but it wont work.. which part of the code is not right?
Can you tell me which part of the code doesn't work? Also try to read the error code if something goes wrong (for example, PackGetFileData/PackAddFileData will return several error messages), which should tell you more where the exact problem is.
actually, after i take a closer look into it.. it worked.. sorry for the trouble..