Use value of constant as part of a macro
#3

Quote:
Originally Posted by Jonny5
View Post
pawn Code:
#define PickupEvent:HOUSE(%0,%1)                                                           \
    forward PickupEvent_1(%0,%1);                                                             \
    public PickupEvent_1(%0,%1)
this should do it
No, what I mean is to use the value of the constant (e.g. PICKUPTYPE_HOUSE = 1) as part of the function name (e.g. PickupEvent_1)
And PICKUPTYPE_HOUSE should be shortened to HOUSE.
That should work dynamically. So I just want to define the new pickup type in my enum and add the PickupEvent:<newtype>(pickupID, pickupType).
Reply


Messages In This Thread
Use value of constant as part of a macro - by Programie - 11.04.2012, 16:57
Re: Use value of constant as part of a macro - by Jonny5 - 11.04.2012, 17:08
Re: Use value of constant as part of a macro - by Programie - 11.04.2012, 17:12
Re: Use value of constant as part of a macro - by Jonny5 - 11.04.2012, 17:19
Re: Use value of constant as part of a macro - by Programie - 11.04.2012, 17:31
Re: Use value of constant as part of a macro - by Jonny5 - 11.04.2012, 17:50
Re: Use value of constant as part of a macro - by Programie - 11.04.2012, 17:53
Re: Use value of constant as part of a macro - by Jonny5 - 11.04.2012, 17:57
Re: Use value of constant as part of a macro - by Programie - 11.04.2012, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)