: error 047: array sizes do not match, or destination array is too small
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";
}
new string[32];
|
It is because of the size of the string increase
PHP код:
|
|
No haha, same as I did before in my beginnings, are things that happens to the new ones there are many errors and warnings that when I leave and I know what I have to do to solve them. Anything I can help you with pleasure
![]() |
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"}
};
GetAdminRank(playerid) return AdminLevelArray[PlayerInfo[playerid][pAdmin]];
// If GetAdminRank(playerid) gives some stupid return message, replace the function with this:
GetAdminRank(playerid) {
new tempReturn[64];
format(tempReturn,64,"%s",AdminLevelArray[PlayerInfo[playerid][pAdmin]]);
return tempReturn;
}
#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"}
};