macro
#8

Quote:
Originally Posted by Jefff
Посмотреть сообщение
ABC:LOL(playerid)

should be

forward xyz_2(playerid);
public xyz_2(playerid)

we must convert LOL to 2 but i don't know how, and i even don't know it's possible
I think I made it

Pawn Code
pawn Код:
#include <a_samp>

#define ABC:%1(%2) \
    forward xyz_%1(%2); \
    public xyz_%1(%2)

main()
{
    print("xyz_"#LOL);
    CallLocalFunction("xyz_"#LOL, "i", 345);
}

ABC:LOL(playerid)
{
    printf("Called: %d",playerid);
    return 1;
}

#define LOL \
    2
Result
Код:
xyz_LOL
Called: 345
You would not believe? Check it your self at http://slice-vps.nl:7070/
Did I? or I am just dreaming?
Reply


Messages In This Thread
macro - by Jefff - 19.12.2013, 21:11
Re: macro - by iJumbo - 19.12.2013, 21:24
Re: macro - by Jefff - 19.12.2013, 21:31
Re: macro - by Patrick - 19.12.2013, 21:33
Re: macro - by Jefff - 19.12.2013, 21:47
Re: macro - by Patrick - 19.12.2013, 21:59
Re: macro - by Jefff - 19.12.2013, 22:03
Re: macro - by Patrick - 19.12.2013, 22:08
Re: macro - by Jefff - 19.12.2013, 22:11
Re: macro - by Patrick - 19.12.2013, 22:28

Forum Jump:


Users browsing this thread: 1 Guest(s)