*** This topic title is not descriptive.
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);
    dcmd(register,8,cmdtext);
    dcmd_register(playerid,params[])
    
    new file[256],n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),"VIP SYSTEM/Users/%s.txt",n);
	return 1;
}
Help required , here codes are

Код:
C:\Documents and Settings\Private200\Desktop\Vip system\filterscript\Vip system UC.pwn(76) : error 017: undefined symbol "dcmd_register"
C:\Documents and Settings\Private200\Desktop\Vip system\filterscript\Vip system UC.pwn(77) : error 017: undefined symbol "dcmd_register"
C:\Documents and Settings\Private200\Desktop\Vip system\filterscript\Vip system UC.pwn(79) : error 001: expected token: ";", but found "new"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
dcmd has been included ..
rep+
Reply
#2

Try this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(register,8,cmdtext);
   
    new file[256],n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),"VIP SYSTEM/Users/%s.txt",n);
    return 1;
}
If you don't know how to work with dcmd put the dcmd_command outside any callback.
Reply
#3

C:\Documents and Settings\Private200\Desktop\Vip system\filterscript\Vip system UC.pwn(74) : error 017: undefined symbol "dcmd_register"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

You need to know how to use dcmd first..
First thing you need is the #define line at the top of the script:
pawn Код:
#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
After that you need to define every command you will use in OnPlayerCommandText like that:
pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
{  
    dcmd(register, 8, cmdtext);
}
Note that the second parameter is the number of characters in the cmd without the '/'.
After defining that, you need to create the command function anywhere outside callbacks like this:
pawn Код:
dcmd_register(playerid, params[])
{
  //Code goes here
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)