SA-MP Forums Archive
Vehicle saving system - 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: Vehicle saving system (/showthread.php?tid=563292)



Vehicle saving system - Bertie - 15.02.2015

pawn Код:
stock VehicleLoad(vid, file[])
{
    INI_ParseFile(file, "LoadVehicleData", .bExtra = true, .extra = vid);
    CreateVehicleEx(VehicleInfo[vid][vModel], VehicleInfo[vid][vSpawn], VehicleInfo[vid[vColor1], VehicleInfo[vid [vColor2], VehicleInfo[vid][vRespawn], VehicleInfo[vid][vOwner]); // Line 53
}
pawn Код:
Gamemode.pwn(53) : error 047: array sizes do not match, or destination array is too small
Gamemode.pwn(53) : warning 215: expression has no effect
Gamemode.pwn(53) : error 001: expected token: ";", but found "]"
Gamemode.pwn(53) : error 029: invalid expression, assumed zero
Gamemode.pwn(53) : fatal error 107: too many error messages on one line
Need help solving this error.


Re: Vehicle saving system - _Mohit_ - 15.02.2015

You forgot to add 2 closing brackets(]) here,
Код:
VehicleInfo[vid[vColor1], VehicleInfo[vid [vColor2]
Just add the closing brackets and it should look like this
Код:
VehicleInfo[vid][vColor1], VehicleInfo[vid][vColor2]
Let me know if it has fixed your problem.