SA-MP Forums Archive
Need some help here? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need some help here? (/showthread.php?tid=377309)



Need some help here? - N0FeaR - 13.09.2012

Код:
C:\Users\Hellman.Hellmans-PC\Desktop\snusk\gamemodes\P-RP.pwn(10137 -- 10151) : error 001: expected token: ",", but found ";"
pawn Код:
}
    idx = 0;
    while (idx < sizeof(GarageInfo))
    {
        new coordsstring[255];
        format(coordsstring, sizeof(coordsstring), "%f|%f|%f|%f|%f|%f|%d|%d|%s|%s|%d|%d|%d\n",
        GarageInfo[idx][gEntrancex],
        GarageInfo[idx][gEntrancey],
        GarageInfo[idx][gEntrancez],
        GarageInfo[idx][gExitx],
        GarageInfo[idx][gExity],
        GarageInfo[idx][gExitz],
        GarageInfo[idx][EnterAngle],
        GarageInfo[idx][ExitAngle],
        GarageInfo[idx][gOwned],
        strmid(GarageInfo[idx][gOwner],
        GarageInfo[idx][gBuyPrice],
        GarageInfo[idx][ExitInterior],
        GarageInfo[idx][Dynamic],
        GarageInfo[idx][gLock]);
        if(idx == 0)
        {
            file2 = fopen("garage.cfg", io_write);
        }
        else
        {
            file2 = fopen("garage.cfg", io_append);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }



Re: Need some help here? - Emmet_ - 13.09.2012

Try this?

pawn Код:
}
    idx = 0;
    while (idx < sizeof(GarageInfo))
    {
        new coordsstring[255];
        format(coordsstring, sizeof(coordsstring), "%f|%f|%f|%f|%f|%f|%d|%d|%s|%s|%d|%d|%d\n",
        GarageInfo[idx][gEntrancex],
        GarageInfo[idx][gEntrancey],
        GarageInfo[idx][gEntrancez],
        GarageInfo[idx][gExitx],
        GarageInfo[idx][gExity],
        GarageInfo[idx][gExitz],
        GarageInfo[idx][EnterAngle],
        GarageInfo[idx][ExitAngle],
        GarageInfo[idx][gOwned],
        GarageInfo[idx][gOwner], // The problem was here.
        GarageInfo[idx][gBuyPrice],
        GarageInfo[idx][ExitInterior],
        GarageInfo[idx][Dynamic],
        GarageInfo[idx][gLock]);
        if(idx == 0)
        {
            file2 = fopen("garage.cfg", io_write);
        }
        else
        {
            file2 = fopen("garage.cfg", io_append);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }



Re: Need some help here? - HuSs3n - 13.09.2012

you have a missing )
in the line starting with strmid


Re: Need some help here? - N0FeaR - 13.09.2012

Thank you.