Dcmd Error
#1

I'm creating an admin script for my server, but the problem is i can't get this code in there,
pawn Код:
{
  dcmd(register, 8, cmdtext);
  dcmd(login, 5, cmdtext);
  dcmd(logout, 6, cmdtext);
  dcmd(password, 8, cmdtext);

  return 0;
}
Without getting this error.
pawn Код:
//*IGNORE* C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(310) : error //*IGNORE*017: undefined symbol "dcmd_register"
//*IGNORE*C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(311) : error //*IGNORE*017: undefined symbol "dcmd_login"
//*IGNORE*C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(312) : error //*IGNORE*017: undefined symbol "dcmd_logout"
//*IGNORE*C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(313) : error 017: undefined symbol "dcmd_password"
C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(317) : warning 225: unreachable code
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])

{
if(strcmp(cmdtext, "/help", true) == 0)
{
     SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++HELP MENU++++++++++++++++++++++");
     SendClientMessage(playerid, COLOR_RED, "Player Commands /pcmds");
     SendClientMessage(playerid, COLOR_RED, "General Commands /gcmds");
     SendClientMessage(playerid, COLOR_RED, "Objective /jobs");
     SendClientMessage(playerid, COLOR_RED, "Vehicles & Weapons /vw");
     SendClientMessage(playerid, COLOR_RED, "Administrator Commands /acmds");
     return 1;
}
{
  dcmd(register, 8, cmdtext);
  dcmd(login, 5, cmdtext);
  dcmd(logout, 6, cmdtext);
  dcmd(password, 8, cmdtext);

  return 0;
}
if(strcmp(cmdtext, "/suicide", true) == 0)
{   SetPlayerHealth(playerid, 0);
    SendClientMessage(playerid, COLOR_RED, "You have commited suicide.");
    return 1;
}
if(strcmp(cmdtext, "/pcmds", true) == 0)
{   SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++Player Commands++++++++++++++++++++++");
    SendClientMessage(playerid, COLOR_RED, "/suicide - Kill yourself.");
    return 1;
}
if(strcmp(cmdtext, "/gcmds", true) == 0)
{   SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++General Commands++++++++++++++++++++++");
    SendClientMessage(playerid, COLOR_RED, "/stats - shows you your current stats.");
    return 1;
}
if(strcmp(cmdtext, "/stats", true) == 0)
{   SendClientMessage(playerid, COLOR_BLUE, "++++++++++++++++++++++Stats++++++++++++++++++++++");
    SendClientMessage(playerid, COLOR_RED, "-Name-");
      new name[MAX_PLAYER_NAME], string[48];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s ", name );
    SendClientMessage(playerid, COLOR_WHITE, string);
    SendClientMessage(playerid, COLOR_RED, "-Money-");
    format(string, sizeof(string), "You Have $%i.", GetPlayerMoney(playerid));
    SendClientMessage(playerid, COLOR_WHITE, string);
    return 1;
   
}
if(strcmp(cmdtext, "/vw", true) == 0)
{
     if(IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_WHITE, "Vehicle Spawned!");
     else SendClientMessage(playerid, COLOR_RED, "You must be logged into RCON to use this command.");
         return 1;
    }
return 0;
}
I have marked down *IGNORE* because i know why I'm getting those, but as for the last error Unreachable Code on line (317) I have no idea why I'm getting this, but it's probably because of my brackets or something, but the help is appreciated.. if someone could fix that for me.

Kind regards,
Patrick
Reply


Messages In This Thread
Dcmd Error - by keujh - 03.04.2010, 18:18
Re: Dcmd Error - by Last_Stand_Guardian - 03.04.2010, 18:24
Re: Dcmd Error - by keujh - 03.04.2010, 18:27
Re: Dcmd Error - by Last_Stand_Guardian - 03.04.2010, 18:32
Re: Dcmd Error - by keujh - 03.04.2010, 18:35
Re: Dcmd Error - by Last_Stand_Guardian - 03.04.2010, 18:36

Forum Jump:


Users browsing this thread: 1 Guest(s)