SA-MP Forums Archive
help - 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: help (/showthread.php?tid=116318)



help - armyoftwo - 28.12.2009

Код:
{
new file[128];
format(file,sizeof(file),"Mafia Wars/HQ's/Gambino.ini");
dini_IntSet(file,"hq1", 0);
HQInfo[TEAM_GAMBINO][hq1] = 321;
HQInfo[TEAM_GAMBINO][hq1] = dini_Int(file, "hq1");
}
It writes hq1=0 instead of hq1=321


Re: help - MadeMan - 28.12.2009

pawn Код:
{
new file[128];
format(file,sizeof(file),"Mafia Wars/HQ's/Gambino.ini");
dini_IntSet(file,"hq1", 0); // change the 0 here or ...
HQInfo[TEAM_GAMBINO][hq1] = 321;
HQInfo[TEAM_GAMBINO][hq1] = dini_Int(file, "hq1"); // ... delete this line
}



Re: help - dice7 - 28.12.2009

pawn Код:
new file[128];
format(file,sizeof(file),"Mafia Wars/HQ's/Gambino.ini");
HQInfo[TEAM_GAMBINO][hq1] = 321;
dini_IntSet(file,"hq1", HQInfo[TEAM_GAMBINO][hq1]);
HQInfo[TEAM_GAMBINO][hq1] = 0;
HQInfo[TEAM_GAMBINO][hq1] = dini_Int(file, "hq1");
//HQInfo[TEAM_GAMBINO][hq1] is now 321



Re: help - armyoftwo - 28.12.2009

Quote:
Originally Posted by dice7
pawn Код:
new file[128];
format(file,sizeof(file),"Mafia Wars/HQ's/Gambino.ini");
HQInfo[TEAM_GAMBINO][hq1] = 321;
dini_IntSet(file,"hq1", HQInfo[TEAM_GAMBINO][hq1]);
HQInfo[TEAM_GAMBINO][hq1] = 0;
HQInfo[TEAM_GAMBINO][hq1] = dini_Int(file, "hq1");
//HQInfo[TEAM_GAMBINO][hq1] is now 321
i tried only this:
Код:
....................
HQInfo[TEAM_GAMBINO][hq1] = 321;
dini_IntSet(file,"hq1", HQInfo[TEAM_GAMBINO][hq1]);
...................
It saved
Thanks! Now its working..
Edit:
Oh, now, i know why i needed that