14.11.2014, 12:04
HEllo i have made a changename command but i am having a problem with it
i get these errors that i dont understand some one help please
Here its the command
i get these errors that i dont understand some one help please
Code:
: warning 219: local variable "PlayerName" shadows a variable at a preceding level : error 017: undefined symbol "Account" : warning 215: expression has no effect : error 001: expected token: ";", but found "]" : error 029: invalid expression, assumed zero : fatal error 107: too many error messages on one line
Code:
COMMAND:changepass(playerid, params[])
{
new file[30], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
if(Account[playerid][Logged] != 1) return SendClientMessage(playerid,Red,"You are not logged in, so you can't use this command!")
if(strlen(params) >= 3)
{
format(file, sizeof(file), "Accounts/%s.txt", PlayerName);
WP_Hash(buf, sizeof(buf), params);
dini_Set(file, "Password");
SendClientMessage(playerid,Green, "Your password has been succesfull changed!");
}
else
{
SendClientMessage(playerid, Red, "Your password need to be atleast 3 characters long!");
}
return 1;
}


