/makeadmin
#8

Quote:
Originally Posted by MadeMan
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  new cmd[256],tmp[256], tmp2[256];
  new idx;
  new string[256];
  cmd = strtok(cmdtext, idx);
  GetPlayerName(playerid, playername, sizeof(playername));
  tmp = strtok(cmdtext, idx);
  if(strcmp(cmd, "/register", true) == 0)
 {
    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), "score", 0);
        format(string, sizeof(string), "Account %s has been made! You can now login with the password: %s.", playername, tmp);
        SendClientMessage(playerid, COLOR_GREEN, string);
      }else{
        format(string, sizeof(string), "%s is already registered.", playername,tmp);
        SendClientMessage(playerid, COLOR_RED, string);
      }
    }
    return 1;
  }
  return 0;
}
I got these errors now:
Quote:

C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(2 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(29 : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(379) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(443) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dutils.inc(462) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dini.inc(46) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\pawno\inclu de\dudb.inc(4 : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73) : warning 219: local variable "tmp2" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(74) : warning 219: local variable "idx" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(75) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73) : warning 204: symbol is assigned a value that is never used: "tmp2"
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73 -- 109) : error 010: invalid function or declaration
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73 -- 111) : error 010: invalid function or declaration
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73 -- 114) : error 010: invalid function or declaration
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73 -- 114) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply


Messages In This Thread
/makeadmin - by geerdinho8 - 28.04.2010, 18:10
Re: /makeadmin - by [MWR]Blood - 28.04.2010, 18:19
Re: /makeadmin - by geerdinho8 - 28.04.2010, 18:22
Re: /makeadmin - by geerdinho8 - 28.04.2010, 18:37
Re: /makeadmin - by MadeMan - 28.04.2010, 18:41
Re: /makeadmin - by geerdinho8 - 28.04.2010, 18:46
Re: /makeadmin - by MadeMan - 28.04.2010, 18:48
Re: /makeadmin - by geerdinho8 - 28.04.2010, 18:50
Re: /makeadmin - by [MWR]Blood - 28.04.2010, 18:52
Re: /makeadmin - by geerdinho8 - 28.04.2010, 18:53

Forum Jump:


Users browsing this thread: 2 Guest(s)