geht das nicht so wie bei gf mit fwriten und der schrott?
siehe hier:
public LoadBizz()
{
new arrCoords[19][64];
new strFromFile2[256];
new File: file = fopen("bizz.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(BizzInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
BizzInfo[idx][bOwned] = strval(arrCoords[0]);
strmid(BizzInfo[idx][bOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
strmid(BizzInfo[idx][bMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
strmid(BizzInfo[idx][bExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
BizzInfo[idx][bEntranceX] = floatstr(arrCoords[4]);
BizzInfo[idx][bEntranceY] = floatstr(arrCoords[5]);
BizzInfo[idx][bEntranceZ] = floatstr(arrCoords[6]);
BizzInfo[idx][bExitX] = floatstr(arrCoords[7]);
BizzInfo[idx][bExitY] = floatstr(arrCoords[8]);
BizzInfo[idx][bExitZ] = floatstr(arrCoords[9]);
BizzInfo[idx][bLevelNeeded] = strval(arrCoords[10]);
BizzInfo[idx][bBuyPrice] = strval(arrCoords[11]);
BizzInfo[idx][bEntranceCost] = strval(arrCoords[12]);
BizzInfo[idx][bTill] = strval(arrCoords[13]);
BizzInfo[idx][bLocked] = strval(arrCoords[14]);
BizzInfo[idx][bInterior] = strval(arrCoords[15]);
BizzInfo[idx][bProducts] = strval(arrCoords[16]);
BizzInfo[idx][bMaxProducts] = strval(arrCoords[17]);
BizzInfo[idx][bPriceProd] = strval(arrCoords[18]);
printf("BizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.\n",
idx,
BizzInfo[idx][bOwner],
BizzInfo[idx][bMessage],
BizzInfo[idx][bEntranceCost],
BizzInfo[idx][bTill],
BizzInfo[idx][bProducts],
BizzInfo[idx][bMaxProducts],
BizzInfo[idx][bInterior]);
idx++;
}
fclose(file);
}
return 1;
}