error array
#1

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

At what line you get that error?
Reply
#3

this line

carinfo[carid][owner] = "name";
Reply
#4

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

ah thx in pawn it not like c#.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)