SA-MP Forums Archive
Warning Tag mismatch error Y_INI - 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: Warning Tag mismatch error Y_INI (/showthread.php?tid=460898)



Warning Tag mismatch error Y_INI - UnknownGamer - 30.08.2013

Whats wrong with this code?

pawn Код:
INI_WriteInt(file,"Model",CarInfo[idx][cModel]);



Re: Warning Tag mismatch error Y_INI - Konstantinos - 30.08.2013

Is the file with INI tag?

pawn Код:
new
    INI: file
;



Re: Warning Tag mismatch error Y_INI - UnknownGamer - 30.08.2013

pawn Код:
C:\Users\matt\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(26678) : error 035: argument type mismatch (argument 1)
C:\Users\matt\Desktop\Raven'
s Roleplay 0.3c\gamemodes\larp.pwn(26678) : error 035: argument type mismatch (argument 1)
C:\Users\matt\Desktop\Raven's Roleplay 0.3c\gamemodes\larp.pwn(26679) : error 035: argument type mismatch (argument 1)
pawn Код:
new INI: file2;
        format(file2, sizeof(file2),"LARP/Vehicles/%d.ini",idx);
        if(fexist(file2))
        {
            INI_WriteInt(file2,"Model",CarInfo[idx][cModel]);
            INI_WriteFloat(file2,"Location_X",CarInfo[idx][cLocationx]);
            INI_WriteFloat(file2,"Location_Y",CarInfo[idx][cLocationy]);
            INI_WriteFloat(file2,"Location_Z",CarInfo[idx][cLocationz]);
            INI_WriteFloat(file2,"Angle",CarInfo[idx][cAngle]);
            INI_WriteInt(file2,"Color_1",CarInfo[idx][cColorOne]);
            INI_WriteInt(file2,"Color_2",CarInfo[idx][cColorTwo]);
            INI_WriteInt(file2,"Owner",CarInfo[idx][cOwner]);
            INI_WriteInt(file2,"Owned",CarInfo[idx][cOwned]);
            INI_WriteInt(file2,"Locked",CarInfo[idx][cLock]);
            INI_WriteInt(file2,"Paintjob",CarInfo[idx][cPaintjob]);
            INI_WriteInt(file2,"VirtualWorld",CarInfo[idx][cVirWorld]);
            INI_WriteInt(file2,"Component0",CarInfo[idx][cComponent0]);
            INI_WriteInt(file2,"Component1",CarInfo[idx][cComponent1]);
            INI_WriteInt(file2,"Component2",CarInfo[idx][cComponent2]);
            INI_WriteInt(file2,"Component3",CarInfo[idx][cComponent3]);
            INI_WriteInt(file2,"Component4",CarInfo[idx][cComponent4]);
            INI_WriteInt(file2,"Component5",CarInfo[idx][cComponent5]);
            INI_WriteInt(file2,"Component6",CarInfo[idx][cComponent6]);
            INI_WriteInt(file2,"Component7",CarInfo[idx][cComponent7]);
            INI_WriteInt(file2,"Component8",CarInfo[idx][cComponent8]);
            INI_WriteInt(file2,"Component9",CarInfo[idx][cComponent9]);
            INI_WriteInt(file2,"Component10",CarInfo[idx][cComponent10]);
            INI_WriteInt(file2,"Component11",CarInfo[idx][cComponent11]);
            INI_WriteInt(file2,"Component12",CarInfo[idx][cComponent12]);
            INI_WriteInt(file2,"Component13",CarInfo[idx][cComponent13]);
            INI_WriteInt(file2,"SecurityCode",CarInfo[idx][cCode]);
pawn Код:
format(file2, sizeof(file2),"LARP/Vehicles/%d.ini",idx);
It doesn't like that


Re: Warning Tag mismatch error Y_INI - Konstantinos - 30.08.2013

No, like that.

pawn Код:
new
    file2[ 64 ]
;
format(file2, sizeof(file2),"LARP/Vehicles/%d.ini",idx);
new
    INI: file = INI_Open(file2)
;
// continue
Take a look at ******' thread about using y_ini.