їCould someone help me?
#1

ЎHi everybody! I have some error with this, i was trying to make a unban system then, i did this command

Code:
CMD:unban(playerid,params[]) {
	if(PlayerInfo[playerid][Level] >= 2) {
            new tmp[128], Index;		tmp = strtok(params,Index); //12075 Line, Error.
            if(!strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Uso: /unban [Nombre]");
            new unbanname[128], string2[128];
            unbanname = tmp;
            if(udb_Exists(unbanname))    {
            dUserSetINT(unbanname).("banned", 0);
            CMDMessageToAdmins(playerid,"UNBAN");
            format(string2,sizeof(string2),"Has desbaneado la cuenta de: %s",unbanname);
            SendClientMessage(playerid,yellow,string2);
            SaveToFile("DesbanNickLog",string2);
           	ShowPlayerDialog(playerid,DESBAN01,DIALOG_STYLE_INPUT," ","{FFFFFF}Ingresa la IP a desbanear:\n","Desbanear","Cancelar");
            } else return SendClientMessage(playerid, COLOR_RED, "No se consiguiу el baneo!.");
        } else return SendClientMessage(playerid,red,"[ERROR] No tienes autorizaciуn para el uso de este comando.");
    return 1;
}
It gives me this error:

Code:
Server.pwn(12075) : error 047: array sizes do not match, or destination array is too small
If you can help me, thanks
Reply
#2

Change:
PHP Code:
 new tmp[128
To:
PHP Code:
 new tmp[256
Reply
#3

Quote:
Originally Posted by aoky
View Post
Change:
PHP Code:
 new tmp[128
To:
PHP Code:
 new tmp[256
Thanks for reply!, now i get this error :\

Code:
Server.pwn(12078) : error 047: array sizes do not match, or destination array is too small
Code:
unbanname = tmp; //Line 12078
Reply
#4

Problem Solved! Thanks for reply @aoky, +rep.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)