SA-MP Forums Archive
error 047: array sizes do not match, or destination array is too small - 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 047: array sizes do not match, or destination array is too small (/showthread.php?tid=329091)



error 047: array sizes do not match, or destination array is too small - nGen.SoNNy - 27.03.2012

Hi! I want to make Drift Rank for my server! But i have the fallowing errors! Please help me

pawn Код:
Somewhere in enum PlayerData
{ } I have DriftRank[28];// (Drift Rank)
if( AccInfo[ playerid ][ DriftPoints ] > 0 && AccInfo[ playerid ][ DriftPoints ] < 50000) return AccInfo[ playerid ][ DriftRank ] = "Begginer";
if( AccInfo[ playerid ][ DriftPoints ] > 50000  && AccInfo[ playerid ][ DriftPoints ] < 100000) return AccInfo[ playerid ][ DriftRank ] = "Drifter";
if( AccInfo[ playerid ][ DriftPoints ] > 100000 && AccInfo[ playerid ][ DriftPoints ] < 150000) return AccInfo[ playerid ][ DriftRank ] = "Pro Drifter";
if( AccInfo[ playerid ][ DriftPoints ] > 150000 && AccInfo[ playerid ][ DriftPoints ] < 200000) return AccInfo[ playerid ][ DriftRank ] = "Expert Drifter";
if( AccInfo[ playerid ][ DriftPoints ] > 200000 && AccInfo[ playerid ][ DriftPoints ] < 250000) return AccInfo[ playerid ][ DriftRank ] = "Fire Tires";
if( AccInfo[ playerid ][ DriftPoints ] > 250000 ) return AccInfo[ playerid ][ DriftRank ] = "Expert Drifter";
pawn Код:
C:\Documents and Settings\SoNNy\Desktop\Project 3 (0.3d)BUD\gamemodes\(SFS).pwn(2183) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\SoNNy\Desktop\Project 3 (0.3d)BUD\gamemodes\(SFS).pwn(2184) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\SoNNy\Desktop\Project 3 (0.3d)BUD\gamemodes\(SFS).pwn(2185) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\SoNNy\Desktop\Project 3 (0.3d)BUD\gamemodes\(SFS).pwn(2186) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\SoNNy\Desktop\Project 3 (0.3d)BUD\gamemodes\(SFS).pwn(2187) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\SoNNy\Desktop\Project 3 (0.3d)BUD\gamemodes\(SFS).pwn(2188) : error 047: array sizes do not match, or destination array is too small



Re: error 047: array sizes do not match, or destination array is too small - Roel - 27.03.2012

Use this at all the 5 lines.

Код:
format( AccInfo[ playerid ][ DriftRank ],28,"Begginer");
instead of
Код:
AccInfo[ playerid ][ DriftRank ] = "Begginer";



Re: error 047: array sizes do not match, or destination array is too small - nGen.SoNNy - 27.03.2012

THX +1 Rep!