Quote:
Originally Posted by Calgon
I was trying to make an unban command for myself, but I failed:
pawn Код:
dcmd_unban(playerid, params[]) { new name[MAX_PLAYER_NAME], string[128], string2[128]; if (sscanf(params, "s", name)) { SendClientMessage(playerid, COLOR_WHITE, "SYNTAX - /unban [name]"); SendClientMessage(playerid, COLOR_GREY, "Full name, this includes underscores."); } else { format(string, sizeof(string), "CRP_Scriptfiles/Accounts/%s.ini", name); if(fexist(string)) { dini_IntSet(string, "Banned", -1); string2 = dini_Get(string, "IP"); fdeleteline("Bans.txt", string2); } else { SendClientMessage(playerid, COLOR_WHITE, "Invalid name, the name was not recognized."); } } }
Errors:
C:\Documents and Settings\Calon\Desktop\SAMP\0.3\gamemodes\crpnew.p wn(20457) : error 047: array sizes do not match, or destination array is too small
Line 20457:
pawn Код:
string2 = dini_Get(string, "IP");
Can someone help me fix this, please?
|
Change string2[128] to string2[MAX_STRING]