SA-MP Forums Archive
Help with script that load info from ini[need fixs] - 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: Help with script that load info from ini[need fixs] (/showthread.php?tid=315670)



Help with script that load info from ini[need fixs] - king4you - 04.02.2012

Thats what i write:
pawn Код:
public LoadAVSVehicles()
{
    new file[64];
    for(new idx = 1; idx < MAX_VEHICLES ; idx++)
    {
    format(file, sizeof(file),"AVS/Vehicles/v%d.ini", idx);
    fopen(file,io_read);
            if(dini_Exists(file))
            {
                format(file, sizeof(file),"AVS/Vehicles/v%d.ini", idx);
                    VehicleOwner[idx] = dini_Get(file, "Owner");
                    //new Owner = dini_Get(file, "Owner");
            }//
    }
    fclose(file);
    return 1;
}
and i get those errors:
pawn Код:
C:\gamemodes\larp.pwn(2387) : error 047: array sizes do not match, or destination array is too small
C:\gamemodes\larp.pwn(2391) : error 035: argument type mismatch (argument 1)
Someone can help me where i did a mistake please?


Respuesta: Help with script that load info from ini[need fixs] - [Nikk] - 04.02.2012

Use [pawn] and [*/pawn] (without *).
Mark the error lines.


Re: Help with script that load info from ini[need fixs] - king4you - 04.02.2012

did the errors are to this line :
pawn Код:
VehicleOwner[idx] = dini_Get(file, "Owner");



Re: Help with script that load info from ini[need fixs] - king4you - 04.02.2012

help?