SA-MP Forums Archive
Error 47 in the load nick - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error 47 in the load nick (/showthread.php?tid=133808)



Error 47 in the load nick - MrLeNy - 13.03.2010

Hello. I create a just system of record, and I have error:
Quote:

cs.pwn(135) : error 047: array sizes do not match, or destination array is too small

This is the code:
Код:
CarInfo[vehid][cOwner] = dini_Get(CarFile(vehid), "Wlasciciel");
Please help


Re: Error 47 in the load nick - Nero_3D - 14.03.2010

use strmid

pawn Код:
strmid(CarInfo[vehid][cOwner], dini_Get(CarFile(vehid), "Wlasciciel"), 0, MAX_PLAYER_NAME);



Re: Error 47 in the load nick - MrLeNy - 14.03.2010

Код:
Pawn compiler 3.2.3664
thx men.


Re: Error 47 in the load nick - MrLeNy - 14.03.2010

//Edit:

it does not work, because when I want to save the file in wlasciciel=
Nothing writes
I have in stock LoadCar:
Код:
strmid(CarInfo[vehid][cOwner], dini_Get(CarFile(vehid), "Wlasciciel"), 0, MAX_PLAYER_NAME);
I have in stock SaveCar:
Код:
dini_IntSet(CarFile(vehid), "Wlasciciel", CarInfo[vehid][cOwner]);
and assigned a nickname like so:
Код:
strmid(CarInfo[CarID][cOwner], PlayerName(playerid),0, MAX_PLAYER_NAME);
Please help


Re: Error 47 in the load nick - Nero_3D - 14.03.2010

is "Wlasciciel" a string or a number ?
because you save a number
but try to load it as a string ...


Re: Error 47 in the load nick - MrLeNy - 14.03.2010

"Wlasciciel" is the nickname of the person who bought a car.

//Edit:
lol waiting for your quick response to how, solved itself.