[Help]Adminstartion Script~Again.
#1

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.
Reply
#2

So Whats WRONG?
Reply
#3

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

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[])
Reply
#5

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

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)
Reply
#7

You haven't defined your dcmd- commands
Reply
#8

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"
Reply
#9

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

Код:
#if defined FILTERSCRIPT
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)