SA-MP Forums Archive
Y_INI 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)
+--- Thread: Y_INI problem (/showthread.php?tid=494985)



Y_INI problem - Nourdin - 15.02.2014

Hello there,

If someone buys a bullet from the shop his points will raise to 100000+ instead of removing 2500 of the current points he got. Anyone knows the problem?

pawn Код:
SendClientMessage(playerid, COLOR_LIME, "[Success]{FFFFFF} You have bought a Bullet for 2500 points! Use /carhelp to see your abilities!");
                    pInfo[playerid][points] -= 2500;
                    pInfo[playerid][vehicle] = true;

                    new INI:file = INI_Open(Path(playerid));
                    INI_SetTag(file,"Player's Data");

                    INI_WriteInt(file,"Points", pInfo[playerid][points]);



Re: Y_INI problem - Nourdin - 15.02.2014

Anyone?


Re: Y_INI problem - Souffi030 - 15.02.2014

I guess that pInfo[playerid][points] is bugged or something


Re: Y_INI problem - Nourdin - 15.02.2014

Well I have tried everything around that but the bug stills appears. I guess it's the yini and not the enum due the fact if I remove Y_ini it works perfect.


Re: Y_INI problem - JacobSanchez - 15.02.2014

try this

pawn Код:
SendClientMessage(playerid, COLOR_LIME, "[Success]{FFFFFF} You have bought a Bullet for 2500 points! Use /carhelp to see your abilities!");
                    pInfo[playerid][points] = -2500;
                    pInfo[playerid][vehicle] = true;

                    new INI:file = INI_Open(Path(playerid));
                    INI_SetTag(file,"Player's Data");

                    INI_WriteInt(file,"Points", pInfo[playerid][points]);



Re: Y_INI problem - Nourdin - 15.02.2014

That works but it changes the amount to -2500 instead of removing 2500.


Re: Y_INI problem - JacobSanchez - 15.02.2014

what do you mean? it should be removing 2500... please add me on skype if you need extra help...

"michaelwharton101"


Re: Y_INI problem - Mattakil - 15.02.2014

jacob's code isn't right.

pawn Код:
pInfo[playerid][points] = -2500;
should be

pawn Код:
pInfo[playerid][points] -= 2500;



Re: Y_INI problem - JacobSanchez - 15.02.2014

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
jacob's code isn't right.

pawn Код:
pInfo[playerid][points] = -2500;
should be

pawn Код:
pInfo[playerid][points] -= 2500;
That's what he has and it does not work still...