INI_LOAD issues - 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: INI_LOAD issues (
/showthread.php?tid=500985)
INI_LOAD issues -
ThaCrypte - 15.03.2014
So, I've been making my faction system, but then some stuff occured. I can't seem to load faction stats into the game.
Saving works, but as loading fails to, everything get set back to 0 when the files get saved.
My code:
pawn Код:
INI:HIT[tag](factionid, name[], value[])
{
INI_Int("Members", FactionInfo[9][fMembers]);
INI_String("Motto", FactionInfo[9][fMotd], 128);
INI_Int("Bank", FactionInfo[9][fBank]);
INI_Float("x", FactionInfo[9][fHQx]);
INI_Float("y", FactionInfo[9][fHQy]);
INI_Float("z", FactionInfo[9][fHQz]);
INI_Float("intx", FactionInfo[9][fHQIntx]);
INI_Float("inty", FactionInfo[9][fHQInty]);
INI_Float("intz", FactionInfo[9][fHQIntz]);
INI_Int("intInterior", FactionInfo[9][fHQInterior]);
return 0;
}
stock LoadFactions()
{
new file9[20];
format(file9, sizeof(file9), "Factions/HIT.ini");
INI_Load(file9, .bLocal = false);
}
Re: INI_LOAD issues -
ThaCrypte - 16.03.2014
pawn Код:
INI:Factions/HIT[tag](factionid, name[], value[])
{
INI_Int("Members", FactionInfo[9][fMembers]);
INI_String("Motto", FactionInfo[9][fMotd], 128);
INI_Int("Bank", FactionInfo[9][fBank]);
INI_Float("x", FactionInfo[9][fHQx]);
INI_Float("y", FactionInfo[9][fHQy]);
INI_Float("z", FactionInfo[9][fHQz]);
INI_Float("intx", FactionInfo[9][fHQIntx]);
INI_Float("inty", FactionInfo[9][fHQInty]);
INI_Float("intz", FactionInfo[9][fHQIntz]);
INI_Int("intInterior", FactionInfo[9][fHQInterior]);
return 0;
}
Tryed this, but didn't seem to work :S:S:S
Re: INI_LOAD issues -
MP2 - 16.03.2014
Why are you using format() (and an array) for a literal string..?
Re: INI_LOAD issues -
ThaCrypte - 16.03.2014
Quote:
Originally Posted by MP2
Why are you using format() (and an array) for a literal string..?
|
I first thought that you just had to use load_ini with a formatted string, but later on I released I didn't. Yet how do I fix the loading problem? As I can't seem to fix it.
Re: INI_LOAD issues -
ThaCrypte - 18.03.2014
Bump(day passed), really need help :S I'm stuck.
Some more info: The factions file are at scriptfiles/Factions.
Re: INI_LOAD issues -
BroZeus - 18.03.2014
why is it did u write return 0; after all that loading try changing it to return 1; not sure it will help u
and also show ur saving system
Re: INI_LOAD issues -
ThaCrypte - 18.03.2014
Quote:
Originally Posted by BroZeus
why is it did u write return 0; after all that loading try changing it to return 1; not sure it will help u
and also show ur saving system
|
Saving works, yet loading doesn't.... That's the problem. and in ****** his tutorial he says that return 0 is a must.
Re: INI_LOAD issues -
ThaCrypte - 19.03.2014
Bump
Re: INI_LOAD issues -
ThaCrypte - 20.03.2014
Bump, please someone help me, as I'm getting annoyed right now.
Re: INI_LOAD issues -
ThaCrypte - 21.03.2014
Bump, Also how comes no one seems to be able to fix this?