Command Problem
#3

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.


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!
Reply


Messages In This Thread
Command Problem - by Scripter123 - 24.10.2010, 18:07
Re: Command Problem - by CSMajor - 24.10.2010, 18:15
Re: Command Problem - by Scripter123 - 24.10.2010, 18:25
Re: Command Problem - by CSMajor - 24.10.2010, 21:22
Re: Command Problem - by Luis- - 24.10.2010, 21:41
Re: Command Problem - by Scripter123 - 25.10.2010, 06:14
Re: Command Problem - by Scripter123 - 25.10.2010, 17:26
Re: Command Problem - by MadeMan - 25.10.2010, 17:28
Re: Command Problem - by Scripter123 - 25.10.2010, 19:31
Re: Command Problem - by Scripter123 - 30.10.2010, 09:58

Forum Jump:


Users browsing this thread: 3 Guest(s)