error 047: array sizes do not match, or destination array is too small
#1

here is line thats having troubles

pawn Code:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { ctext = vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]; }
Error Name

Code:
 error 047: array sizes do not match, or destination array is too small
Can anybody give meh a quick hand?
Reply
#2

Have you made

pawn Code:
new ctext[128];
?
Reply
#3

yep but i made it ctext[256]; i just set it to 128 and still error :\
Reply
#4

You can't set strings like that, use format for that.
pawn Code:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) format(ctext, sizeof(ctext), vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)