Creating a stock to return file path of a users account, better ways? [REP++]
#1

Alright so far this is what I have.

pawn Код:
stock GetAccountPath(playerid)
{
    new Player[25];
    new AccountName[50];

    GetPlayerName(playerid, Player, sizeof(Player) );
    format(AccountName,sizeof(AccountName),"\\Accounts\\%s.ini", Player);
   
    return AccountName;
}
and I have to call it like so.

pawn Код:
new File[50];
    format(File,sizeof(File),"%s",GetAccountPath(playerid) );

now I haven't been around for a while but I am pretty sure there's a much simpler way I've missed, like being able to return the value without having to format it into another string.
Reply


Messages In This Thread
Creating a stock to return file path of a users account, better ways? [REP++] - by Hoborific - 13.05.2013, 07:18
Re: Creating a stock to return file path of a users account, better ways? [REP++] - by [HiC]TheKiller - 13.05.2013, 09:18
Re: Creating a stock to return file path of a users account, better ways? [REP++] - by Hoborific - 13.05.2013, 09:46

Forum Jump:


Users browsing this thread: 1 Guest(s)