Y_INI problem
#1

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]);
Reply
#2

Anyone?
Reply
#3

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

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.
Reply
#5

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]);
Reply
#6

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

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

"michaelwharton101"
Reply
#8

jacob's code isn't right.

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

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

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)