Posts: 156
Threads: 25
Joined: May 2016
Код:
: error 047: array sizes do not match, or destination array is too small
pawn Код:
GetAdminRank(playerid)
{
new string[24];
switch(PlayerInfo[playerid][pAdmin])
{
case 0: string = "None";
case 1: string = "{1D5857}Secret Admin";
case 2: string = "{FFFF00}Junior Admin";
case 3: string = "{26D607}General Admin";
case 4: string = "{F9DE84}Senior Admin";
case 5: string = "{F87627}Head Admin";
case 6: string = "{C50574}Assistant Management"; // <<<<<< THIS LINE WHERE THE ERROR OCCURS
case 7: string = "{EE39CE}Management";
}
WHen i remove the {C50574} it doesnt give any error anymore
Pretty much weird why?
Posts: 156
Threads: 25
Joined: May 2016
Quote:
Originally Posted by Swankeh
It is because of the size of the string increase
|
thanks lol im so stupid
Posts: 325
Threads: 5
Joined: Jun 2017
@whadez what about optimising it to be faster?
PHP код:
#define GetAdminLevel(%0) AdminLevelArray[PlayerInfo[%0][pAdmin]]
new AdminLevelArray[8][64] = {
{"None"},{"{1D5857}Secret Admin"},{"{FFFF00}Junior Admin"},{"{26D607}General Admin"},{"{F9DE84}Senior Admin"},{"{F87627}Head Admin"},{"{C50574}Assistant Management"},{"{EE39CE}Management"}
};