How would i do this
#1

I am trying to make a path to get the path to the file


I have this so far

pawn Код:
#define HPATH "/Houses/Houses/%s.ini"

I have this but it dont work


pawn Код:
stock HousePath
{
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername)):
    format(string,sizeof(string,HPATH,playername);
    return string;
}

Thank You


Please Help Me Please
Reply
#2

pawn Код:
#define HPATH "/Houses/Houses/"


stock HousePath()
{
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername)):
    format(string,sizeof(string)," %s%s.ini",HPATH ,playername);
    return string;
}
try that
Reply
#3

You forgot to close the sizeof bracket.
pawn Код:
format(string,sizeof(string)," %s%s.ini",HPATH ,playername);
Reply
#4

Forgot to close the bracket onderdak, but above-mentioned answers miss one thing:
pawn Код:
format(string,sizeof(string), HPATH, playername);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)