Saving problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Saving problem (
/showthread.php?tid=113171)
Saving problem -
westre - 12.12.2009
Cheers.
Re: Saving problem -
miokie - 12.12.2009
Use Dini, It's much simpler:
Sets the bank to file:
pawn Код:
dini_IntSet("govbank.txt","Bank",govInfo[gGovBank]);
Read the bank from file:
pawn Код:
govInfo[gGovBank] = dini_Int("govbank.txt","Bank");
pawn Код:
public SaveGovBank()
{
if(!dini_Exists("govbank.txt"))
{
dini_Create("govbank.txt");
}
dini_IntSet("govbank.txt","Bank",govInfo[gGovBank]);
return 1;
}
pawn Код:
public LoadGovBank()
{
if(!dini_Exists("govbank.txt"))
{
dini_Create("govbank.txt");
dini_IntSet("govbank.txt","Bank",govInfo[gGovBank]);
}
govInfo[gGovBank] = dini_Int("govbank.txt","Bank");
return 1;
}
Re: Saving problem -
westre - 12.12.2009
Wow, that it could be that simple using Dini.
Anyway thank you for your great and fast support Miokie.