Problems Making My Admin script
#1

Ok, sorry about so many posts asking for help (this is like my third one) but im following this tutorial: https://sampwiki.blast.hk/wiki/Creating_...n_FilterScript

Код:
dcmd_register(playerid, params[])
{
    if(gPlayerInfo[playerid][PLAYER_REGGED] == 1)
	return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You have already registered!");
    else if(!params[0])
	return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /register [password]");
    else if(strlen(params) < gSettings[PASS_MIN] || strlen(params) > gSettings[PASS_MAX])
    {
	new string[128];
        format(string, sizeof(string), "ERROR: Password must be between %d and $d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
	return SendClientMessage(playerid, COLOUR_ORANGE, string);
    }
    else
    {
	new password = num_hash(params);
	gPlayerInfo[playerid][PLAYER_PASS] = password;
	gPlayerInfo[playerid][PLAYER_REGGED] = 1;
        gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
	GetPlayerIp(playerid, gPlayerInfo[playerid][PLAYER_IP], 16);
	new string[128]; format(string, sizeof(string), "You have successfully registered your account with the password \'%s\'. You have been automatically logged in.", params);
	return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
    }
}
I got this:

Код:
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(8) : warning 201: redefinition of constant/macro (symbol "dcmd(%1,%2,%3)")
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(84) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(88) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(109) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(110) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(132) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(133) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(140) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(141) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(161) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(162) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(198) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(199) : warning 217: loose indentation
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(193) : warning 203: symbol is never used: "index"
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(183) : warning 203: symbol is never used: "params"
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(243) : warning 203: symbol is never used: "dcmd_akill"
C:\Documents and Settings\Ed\My Documents\SAMP Server TKFS\filterscripts\TKAdmin.pwn(243) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


17 Warnings.
As you can see its only warnings, but in game when I do /register hhjjkk3344 (password I made up) it says: ERROR: Password must be between 0 and $d characters long!

Now, I got dcmd in the includes folder so it isn't that. So, I have no idea what it is.

And this is in the password command. So again sorry for making so many help posts.
Reply


Messages In This Thread
Problems Making My Admin script - by Odyssey - 29.04.2011, 00:42
Re: Problems Making My Admin script - by Backwardsman97 - 29.04.2011, 05:27
Re: Problems Making My Admin script - by Odyssey - 04.05.2011, 14:23
Re: Problems Making My Admin script - by Seven_of_Nine - 04.05.2011, 14:58

Forum Jump:


Users browsing this thread: 2 Guest(s)