Error 47 in the load nick
#1

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
Reply
#2

use strmid

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

Код:
Pawn compiler 3.2.3664
thx men.
Reply
#4

//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
Reply
#5

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)