error array - 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: error array (
/showthread.php?tid=307975)
error array -
jaskiller - 01.01.2012
hi I have a probleme with string array
PHP код:
enum cInfo
{
owner[MAX_PLAYER_NAME]
}
new carinfo[MAX_VEHICLES][cInfo]
when I do
PHP код:
carinfo[carid][owner] = "name";
I have error : error 047: array sizes do not match, or destination array is too small
who can help me plz
Re: error array -
Face9000 - 01.01.2012
At what line you get that error?
Re : error array -
jaskiller - 01.01.2012
this line
carinfo[carid][owner] = "name";
Re: error array -
-Prodigy- - 01.01.2012
Use strcat to copy strings:
pawn Код:
strcat(carinfo[carid][owner], "name", MAX_PLAYER_NAME);
I also recommend using "strcpy" by ******. Can be found on his Optimization thread.
Re : error array -
jaskiller - 02.01.2012
ah thx in pawn it not like c#.