26.06.2012, 15:56
Quote:
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;
}
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;
}