SA-MP Forums Archive
[Help]Adminstartion Script~Again. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help]Adminstartion Script~Again. (/showthread.php?tid=103049)



[Help]Adminstartion Script~Again. - Danikov - 18.10.2009

I Have this in pawno what it says that it has error and here it is:
Код:
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(258) : error 017: undefined symbol "dcmd_login"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(259) : error 017: undefined symbol "dcmd_logout"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(260) : error 017: undefined symbol "dcmd_password"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(288) : warning 225: unreachable code
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(288) : error 017: undefined symbol "dcmd_login"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: [Help]Adminstartion Script~Again. - Danikov - 18.10.2009

So Whats WRONG?


Re: [Help]Adminstartion Script~Again. - Tigerbeast11 - 18.10.2009

Plz dont bump! Plz also post the script so we can know what is wrong!


Re: [Help]Adminstartion Script~Again. - Danikov - 18.10.2009

Fine here is line 258 as said in the compiler:
Код:
  dcmd(login, 5, cmdtext);
And here is line 259 and 260:
Код:
  dcmd(logout, 6, cmdtext);
  dcmd(password, 8, cmdtext);
And line 288:
Код:
dcmd_login(playerid, params[])



Re: [Help]Adminstartion Script~Again. - ilikepie2221 - 18.10.2009

Can we see lines 250-290? Cause those lines alone aren't causing the problem.


Re: [Help]Adminstartion Script~Again. - Danikov - 18.10.2009

ok here they are:
Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(register, 8, cmdtext);
  dcmd(login, 5, cmdtext);
  dcmd(logout, 6, cmdtext);
  dcmd(password, 8, cmdtext);

  return 0;
}

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[200];
    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[256]; 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);
	}

	dcmd_login(playerid, params[])
	{
  if(gPlayerInfo[playerid][PLAYER_REGGED] != 1)



Re: [Help]Adminstartion Script~Again. - Jakku - 18.10.2009

You haven't defined your dcmd- commands


Re: [Help]Adminstartion Script~Again. - Danikov - 18.10.2009

do each of them #define?
here is all my defines:
Код:
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOUR_GREEN      0x33AA33AA
#define COLOUR_RED       0xAA3333AA
#define COLOUR_YELLOW     0xFFFF00AA
#define COLOUR_LIGHTBLUE    0x33CCFFAA
#define COLOUR_ORANGE     0xFF9900AA

#define PlayerFile			  "AdminScript/Users/%s.ini"
#define SettingFile      "AdminScript/Settings/MainSettings.ini"
#define CommandFile      "AdminScript/Settings/Commands.ini"



Re: [Help]Adminstartion Script~Again. - Danikov - 18.10.2009

oh and sorry for this bump i forgot to show another line from the #define

Код:
#if defined FILTERSCRIPT



Re: [Help]Adminstartion Script~Again. - Danikov - 18.10.2009

Okay i added 3 more defines which are
Код:
#define dcmd_login
#define dcmd_logout
#define dcmd_password