3 different errors
#7

Is it because you have %d instead of a %s in the format line, because you can't really use %d on a string with a certain string length. Try this:
pawn Код:
SaveHouses() {

    new
        szFileStr[2048],
        File: fHandle = fopen("houses.cfg", io_write);

    for(new iIndex; iIndex < MAX_HOUSES; iIndex++) {
        format(szFileStr, sizeof(szFileStr), "%d|%d|%d|%s|%s|%f|%f|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%f|%f|%f|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\r\n",
            HouseInfo[iIndex][hOwned],
            HouseInfo[iIndex][hLevel],
            HouseInfo[iIndex][hHInteriorWorld],
            HouseInfo[iIndex][hDescription],
            HouseInfo[iIndex][hOwner],
            HouseInfo[iIndex][hExteriorX],
            HouseInfo[iIndex][hExteriorY],
            HouseInfo[iIndex][hExteriorZ],
            HouseInfo[iIndex][hExteriorR],
            HouseInfo[iIndex][hInteriorX],
            HouseInfo[iIndex][hInteriorY],
            HouseInfo[iIndex][hInteriorZ],
            HouseInfo[iIndex][hInteriorR],
            HouseInfo[iIndex][hLock],
            HouseInfo[iIndex][hRentable],
            HouseInfo[iIndex][hRentFee],
            HouseInfo[iIndex][hValue],
            HouseInfo[iIndex][hSafeMoney],
            HouseInfo[iIndex][hPot],
            HouseInfo[iIndex][hCrack],
            HouseInfo[iIndex][hMaterials],
            HouseInfo[iIndex][hWeapons][0],
            HouseInfo[iIndex][hWeapons][1],
            HouseInfo[iIndex][hWeapons][2],
            HouseInfo[iIndex][hWeapons][3],
            HouseInfo[iIndex][hWeapons][4],
            HouseInfo[iIndex][hGLUpgrade],
            HouseInfo[iIndex][hPickupID],
            HouseInfo[iIndex][hCustomInterior],
            HouseInfo[iIndex][hCustomExterior],
            HouseInfo[iIndex][hMailboxX],
            HouseInfo[iIndex][hMailboxY],
            HouseInfo[iIndex][hMailboxZ],
            HouseInfo[iIndex][hMail1Sender][26],  //THE ERROR LINE
            HouseInfo[iIndex][hMail1Topic][30],
            HouseInfo[iIndex][hMail1Message][150],
            HouseInfo[iIndex][hMail2Sender][26],
            HouseInfo[iIndex][hMail2Topic][30],
            HouseInfo[iIndex][hMail2Message][150],
            HouseInfo[iIndex][hMail3Sender][26],
            HouseInfo[iIndex][hMail3Topic][30],
            HouseInfo[iIndex][hMail3Message][150],
            HouseInfo[iIndex][hMail4Sender][26],
            HouseInfo[iIndex][hMail4Topic][30],
            HouseInfo[iIndex][hMail4Message][150],
            HouseInfo[iIndex][hMail5Sender][26],
            HouseInfo[iIndex][hMail5Topic][30],
            HouseInfo[iIndex][hMail5Message][150],
            HouseInfo[iIndex][hMail6Sender][26],
            HouseInfo[iIndex][hMail6Topic][30],
            HouseInfo[iIndex][hMail6Message][150]
        );
        fwrite(fHandle, szFileStr);
    }
    return fclose(fHandle);
}
Reply


Messages In This Thread
3 different errors - by Mado - 08.12.2012, 21:24
Re: 3 different errors - by Ironboy - 08.12.2012, 21:53
Re: 3 different errors - by Mado - 08.12.2012, 21:59
Re: 3 different errors - by Ironboy - 08.12.2012, 22:34
Re: 3 different errors - by Mado - 09.12.2012, 08:42
Re: 3 different errors - by [HK]Ryder[AN] - 09.12.2012, 08:48
Re: 3 different errors - by Threshold - 09.12.2012, 09:49
Re: 3 different errors - by Mado - 09.12.2012, 11:37
Re: 3 different errors - by Mado - 09.12.2012, 11:44
Re: 3 different errors - by Windrush - 09.12.2012, 11:48

Forum Jump:


Users browsing this thread: 1 Guest(s)