YCMD problem[++REP]
#1

This code:

pawn Код:
#define ACMD(%0,%1,%2,%3) \
YCMD:%0(%1,%2,help) \
    if(PI[playerid][admin] < %3) return Error(%0, "You are not authorized to use that command")


ACMD(kick, playerid, params, CMD_KICK)
{
    return 1;
}
Is showing this error:
pawn Код:
error 020: invalid symbol name "_YCMD_1"
error 010: invalid function or declaration
Any help will be appreciated.

Edit: I am actually trying to achieve a system which prevents me from comparing and sending the Unauthorized Error message multiple times.
Reply
#2

lol this is your code

Код:
#define ACMD(%0,%1,%2,%3) \
YCMD:%0(%1,%2,help) \
    if(PI[playerid][admin] < %3) return Error(%0, "You are not authorized to use that command")


ACMD(kick, playerid, params, CMD_KICK)
{
    return 1;
}
Did u make this ? from ACMD to YCMD !!

Код:
#define YCMD(%0,%1,%2,%3) \
YCMD:%0(%1,%2,help) \
    if(PI[playerid][admin] < %3) return Error(%0, "You are not authorized to use that command")


ACMD(kick, playerid, params, CMD_KICK)
{
    return 1;
}
or maybe this
Код:
#define ACMD(%0,%1,%2,%3) \
ACMD:%0(%1,%2,help) \
    if(PI[playerid][admin] < %3) return Error(%0, "You are not authorized to use that command")


ACMD(kick, playerid, params, CMD_KICK)
{
    return 1;
}
I dont know but this might be !! just giving a idea!!
Reply
#3

Quote:
Originally Posted by Arnold_Collins
Посмотреть сообщение
lol this is your code

Код:
#define ACMD(%0,%1,%2,%3) \
YCMD:%0(%1,%2,help) \
    if(PI[playerid][admin] < %3) return Error(%0, "You are not authorized to use that command")


ACMD(kick, playerid, params, CMD_KICK)
{
    return 1;
}
Did u make this ? from ACMD to YCMD !!

Код:
#define YCMD(%0,%1,%2,%3) \
YCMD:%0(%1,%2,help) \
    if(PI[playerid][admin] < %3) return Error(%0, "You are not authorized to use that command")


ACMD(kick, playerid, params, CMD_KICK)
{
    return 1;
}
or maybe this
Код:
#define ACMD(%0,%1,%2,%3) \
ACMD:%0(%1,%2,help) \
    if(PI[playerid][admin] < %3) return Error(%0, "You are not authorized to use that command")


ACMD(kick, playerid, params, CMD_KICK)
{
    return 1;
}
I dont know but this might be !! just giving a idea!!
That won't fix it.

Edit: I am actually trying to achieve a system which prevents me from comparing and sending the Unauthorized Error message multiple times.
Reply
#4

So try read this mate !! This might help you >> https://sampforum.blast.hk/showthread.php?tid=169029
Reply
#5

Quote:
Originally Posted by Arnold_Collins
Посмотреть сообщение
So try read this mate !! This might help you >> https://sampforum.blast.hk/showthread.php?tid=169029
I did.
Reply
#6

Well i cant give anymore ideas !! I think you should Contact ****** the YCMD Creator he might help you send him a pm !!
Reply
#7

Quote:
Originally Posted by Arnold_Collins
Посмотреть сообщение
Well i cant give anymore ideas !! I think you should Contact ****** the YCMD Creator he might help you send him a pm !!
He is not on.
Reply
#8

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
He is not on.
So try send him a pm !! Only ****** can help you i dont think anyone else know what you need !!
Reply
#9

Try putting an "else" in the and of the macro.

Why you get _YCMD_1, I'm not sure.. Compile with the flag -l (that's a lower-case L), and have a look at the .lst file it outputs. It will show the file after all preprocessing is done (i.e. all macro replaces done).
Reply
#10

Look at the y_cmds topic.
Command_SetPlayerNamed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)