[HELP] Macro.
#10

Quote:
Originally Posted by ******
Посмотреть сообщение
If that's the result then you haven't understood perfectly what I said.
pawn Код:
#define string:
#define TYPES:%0) _:TYPE_N:TYPE_M:##%0,,)
#define TYPE_N:TYPE_M:##,,) "")
#define TYPE_M:##%2,%3) TYPE_0:TYPE_1:TYPE_E:##|||%2|||%3)
#define TYPE_0:TYPE_1:TYPE_E:#%0#%1|||%2[%8]%9|||%3,%4) TYPE_0a:TYPE_0b:#%0#%1|||%2|||%3,%4)
#define TYPE_0a:TYPE_0b:#%0#%1|||%9string:%2|||%3,%4) TYPE_0:TYPE_1:TYPE_E:#%0s#%1,%2|||%3|||%4)
#define TYPE_0b:#%0#%1|||%2|||%3,%4,%5) TYPE_0:TYPE_1:TYPE_E:#%0ai#%1,%2,%3|||%4|||%5)
#define TYPE_1:TYPE_E:#%0#%1|||%2|||%3,%4) TYPE_1a:TYPE_1b:#%0#%1|||%2|||%3,%4)
#define TYPE_1a:TYPE_1b:#%0#%1|||%6:%2|||%3,%4) TYPE_0:TYPE_1:TYPE_E:#%0i#%1,_:%2|||%3|||%4)
#define TYPE_1b:#%0#%1|||%2|||%3,%4) TYPE_0:TYPE_1:TYPE_E:#%0i#%1,%2|||%3|||%4)
#define TYPE_E:#%0#%1||||||%3) #%0#%1)
   
#define Test(%0,%1) forward @%0(%1); public @%0(%1) { CallRemoteFunction(#%0,TYPES:%1); } forward %0(%1); public %0(%1)

Test(FuncTest, playerid, string[]) {
    printf("%i %s", playerid, string);
    return 1;
}
output

pawn Код:
#define string:
#define TYPES:%0) _:TYPE_N:TYPE_M:##%0,,)
#define TYPE_N:TYPE_M:##,,) "")
#define TYPE_M:##%2,%3) TYPE_0:TYPE_1:TYPE_E:##|||%2|||%3)
#define TYPE_0:TYPE_1:TYPE_E:#%0#%1|||%2[%8]%9|||%3,%4) TYPE_0a:TYPE_0b:#%0#%1|||%2|||%3,%4)
#define TYPE_0a:TYPE_0b:#%0#%1|||%9string:%2|||%3,%4) TYPE_0:TYPE_1:TYPE_E:#%0s#%1,%2|||%3|||%4)
#define TYPE_0b:#%0#%1|||%2|||%3,%4,%5) TYPE_0:TYPE_1:TYPE_E:#%0ai#%1,%2,%3|||%4|||%5)
#define TYPE_1:TYPE_E:#%0#%1|||%2|||%3,%4) TYPE_1a:TYPE_1b:#%0#%1|||%2|||%3,%4)
#define TYPE_1a:TYPE_1b:#%0#%1|||%6:%2|||%3,%4) TYPE_0:TYPE_1:TYPE_E:#%0i#%1,_:%2|||%3|||%4)
#define TYPE_1b:#%0#%1|||%2|||%3,%4) TYPE_0:TYPE_1:TYPE_E:#%0i#%1,%2|||%3|||%4)
#define TYPE_E:#%0#%1||||||%3) #%0#%1)
   
#define Test(%0,%1) forward @%0(%1); public @%0(%1) { CallRemoteFunction(#%0,TYPES:%1); } forward %0(%1); public %0(%1)

forward @FuncTest( playerid, string[]); public @FuncTest( playerid, string[]) { CallRemoteFunction(#FuncTest,_:TYPE_N:TYPE_0:TYPE_1a:TYPE_0a:TYPE_0b:#i#, playerid||| string|||,); } forward FuncTest( playerid, string[]); public FuncTest( playerid, string[]) {
    printf("%i %s", playerid, string);
    return 1;
}
Please correct me if I'm wrong, because that's what I understood ...
Reply


Messages In This Thread
[HELP] Macro. - by paulor - 25.06.2012, 15:54
Re: [HELP] Macro. - by iggy1 - 25.06.2012, 16:58
Re: [HELP] Macro. - by paulor - 25.06.2012, 17:11
Re: [HELP] Macro. - by iggy1 - 25.06.2012, 17:14
Re: [HELP] Macro. - by paulor - 25.06.2012, 17:17
Re: [HELP] Macro. - by paulor - 25.06.2012, 17:25
Re: [HELP] Macro. - by paulor - 26.06.2012, 15:11
Re: [HELP] Macro. - by paulor - 26.06.2012, 15:34
Re: [HELP] Macro. - by paulor - 26.06.2012, 15:47
Re: [HELP] Macro. - by paulor - 26.06.2012, 15:56

Forum Jump:


Users browsing this thread: 2 Guest(s)