/makeadmin
#3

EDIT: I have now only one error:
Quote:

C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(100) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(115) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(116) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(137) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(140) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(145) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(145) : warning 219: local variable "tmp2" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(145) : warning 219: local variable "idx" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(147) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(147) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(147) : warning 219: local variable "adminname" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(147) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(150) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(154) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(162) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(163) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(16 : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(173) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(186) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(210) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(212) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(21 : error 030: compound statement not closed at the end of file (started at line 73)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Command:
Quote:

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;
}

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: 1 Guest(s)