How would i do this - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How would i do this (
/showthread.php?tid=338974)
How would i do this -
Scripter12345 - 01.05.2012
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
Re: How would i do this -
park4bmx - 01.05.2012
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
Re: How would i do this -
Biesmen - 01.05.2012
You forgot to close the sizeof bracket.
pawn Код:
format(string,sizeof(string)," %s%s.ini",HPATH ,playername);
Re: How would i do this -
Hiddos - 01.05.2012
Forgot to close the bracket onderdak, but above-mentioned answers miss one thing:
pawn Код:
format(string,sizeof(string), HPATH, playername);