SA-MP Forums Archive
YCMD problem[++REP] - 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)
+--- Thread: YCMD problem[++REP] (/showthread.php?tid=329455)



YCMD problem[++REP] - T0pAz - 28.03.2012

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.


Re: YCMD problem[++REP] - Arnold_Collins - 28.03.2012

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!!


Re: YCMD problem[++REP] - T0pAz - 28.03.2012

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.


Re: YCMD problem[++REP] - Arnold_Collins - 28.03.2012

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


Re: YCMD problem[++REP] - T0pAz - 28.03.2012

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.


Re: YCMD problem[++REP] - Arnold_Collins - 28.03.2012

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


Re: YCMD problem[++REP] - T0pAz - 28.03.2012

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.


Re: YCMD problem[++REP] - Arnold_Collins - 28.03.2012

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 !!


Re: YCMD problem[++REP] - Slice - 29.03.2012

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).


Re: YCMD problem[++REP] - MP2 - 29.03.2012

Look at the y_cmds topic.
Command_SetPlayerNamed