Command don't work anymore
#1

Hey,
I have a login-register system created by someone else. I use it for a long time and i never had any trouble. But suddenly the /register command don't work any more. I haven't changed anything to this command, i only add some more commands to the script. Anyone know what could be the reason for this??
Greetz,
sean5874
Reply
#2

We can't do anything if we don't see the script.
Reply
#3

What does it say?
Reply
#4

Quote:

We can't do anything if we don't see the script.

Here you have the piece of script we're talking about:

Код:
if(strcmp(cmd, "/register", true) == 0)
  {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
      SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /register (password)");
    }
    else
    {
 			if (!dini_Exists(udb_encode(playername)))
     	{
       	dini_Create(udb_encode(playername));
        dini_IntSet(udb_encode(playername), "password", udb_hash(tmp));
        dini_IntSet(udb_encode(playername), "adminlevel", 0);
        dini_IntSet(udb_encode(playername), "money", 0);
        dini_IntSet(udb_encode(playername), "license", 1);
        dini_IntSet(udb_encode(playername), "health", 100);
        dini_IntSet(udb_encode(playername), "bankmoney", 100);
        dini_IntSet(udb_encode(playername), "fightstyle", 0);
        dini_IntSet(udb_encode(playername), "carlocks", 0);
        dini_IntSet(udb_encode(playername), "cigarets", 0);
        dini_IntSet(udb_encode(playername), "beer", 0);
        dini_IntSet(udb_encode(playername), "sprunk", 0);
        dini_IntSet(udb_encode(playername), "rope", 0);
        format(string, sizeof(string), "Account %s was created. You can now log in with the password: %s.", playername, tmp);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        TextDrawHideForPlayer(playerid, register);
        TextDrawShowForPlayer(playerid, login);
        return 1;
      }
      else
      {
        format(string, sizeof(string), "%s already registered.", playername,tmp);
        SendClientMessage(playerid, COLOR_RED, string);
      }
    }
    return 1;
  }
Quote:

Insert Quote
What does it say?

Thats the weirdest thing: it don't say unkown command or something, but it says nothing!
Reply
#5

I don't actually know but is the first return 1; really needed? I think you only need it at the end.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)