24.10.2010, 18:25
(
Последний раз редактировалось Scripter123; 24.10.2010 в 18:52.
)
its GM. Im sorry for dont say that.
I got a warning of Lose intentification in a return 1;
I know how to fix it, and tried and searched, but nothing
It is in Register command the return 1; of register command.
EDIT: The return have warning not error!
I got a warning of Lose intentification in a return 1;
I know how to fix it, and tried and searched, but nothing
It is in Register command the return 1; of register command.
pawn Код:
new cmd[256], idx, file[128], tmp[256], tmp2[256];
cmd = strtok(cmdtext, idx);
if (strcmp("/register", cmdtext, true, 10) == 0)
{
new name[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, name, sizeof(name));
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /register [password]");
format(file,sizeof(file),"%s.ini",name);
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(tmp));
dini_IntSet(file,"AdminLevel", 0);
dini_IntSet(file,"Cash", 0);
SendClientMessage(playerid, 0xFFFFFFFF, "[System]: Account Created!");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
GetPlayerName(playerid, name, sizeof(name));
printf("%s has registered a account!", name);
}
else
{
SendClientMessage(playerid, 0xAA3333AA, " Account Already Found In Database");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
return 1; ====== THIS RETURN 1;
}
EDIT: The return have warning not error!