24.10.2012, 15:50
(
Последний раз редактировалось Opah; 24.10.2012 в 17:14.
)
pawn Код:
COMMAND:changename(playerid,params[])
{
new String[24];if(sscanf(params,"s",String)) return SendClientMessage(playerid,COLOR_RED,""WHITE"Usage:"GREEN"/changename "WHITE"[playerid]");
if(String > 24 ) return SendClientMessage(playerid,COLOR_RED,"ERROR : the name must be smaller than 24 characters");
new file[50];format(file,50,"Users/%s.ini",String);// ==> error line
if(fexist(file)) return SendClientMessage(playerid,COLOR_RED,"ERROR : the name you have chosen is used by somebody else please choose another one");
new str[256];
format(str,256,"%s,%s",pInfo[playerid][Aka],String);
pInfo[playerid][Aka] = str;
SetPlayerName(playerid,String);
return 1;
}
Код:
array must be indexed (variable "String")