How to convert this function to macro (#define bla bla )
#3

I known about that code, the main reason is when i do it, it just output 1 of first character

if you don't know what i mean, when i do this test, the output is
R
R
pawn Код:
#include <a_samp>
#include <YSI_Core\y_utils>

enum e_enum
{
    pName[MAX_PLAYER_NAME],
    pUsername[MAX_PLAYER_NAME]
};
new PlayerData[1][e_enum];

public OnGameModeInit()
{
    new playerid = 0;
   
    strcpy(PlayerData[playerid][pName], "Raefaldhi Amartya", 24);
    strcpy(PlayerData[playerid][pUsername], "Raefaldhi_Amartya", 24);
    printf("%s", GetPlayerNameEx(playerid, true));
    printf("%s", GetPlayerNameEx(playerid, false));
    return 1;
}

GetPlayerNameEx(playerid, bool:underscore = true)
    return (underscore) ? (PlayerData[playerid][pUsername]) : (PlayerData[playerid][pName]);

main() {}
Reply


Messages In This Thread
How to convert this function to macro (#define bla bla ) - by RaeF - 07.01.2015, 06:43
Re: How to convert this function to macro (#define bla bla ) - by Threshold - 07.01.2015, 10:11
Re: How to convert this function to macro (#define bla bla ) - by RaeF - 07.01.2015, 11:13
Re: How to convert this function to macro (#define bla bla ) - by Threshold - 07.01.2015, 12:16

Forum Jump:


Users browsing this thread: 1 Guest(s)