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



dini problem - iThePunisher - 25.03.2014

im getting those problems
pawn Код:
C:\Users\arjan\Desktop\Cops And Robbers\gamemodes\lscnr.pwn(10317) : error 035: argument type mismatch (argument 1)
C:\Users\arjan\Desktop\Cops And Robbers\gamemodes\lscnr.pwn(10319) : error 035: argument type mismatch (argument 1)
C:\Users\arjan\Desktop\Cops And Robbers\gamemodes\lscnr.pwn(10320) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
while im trying to increase cop scores at dini saving folder

pawn Код:
if(dini_Int(i, "Copskill") < 5)//
                {
                    dini_IntSet(i, "Copskill", dini_Int(i, "Copskill") + 2);
                    format(string, 120, ":[SKILL UPGRADE]: Your Cop skill has increased! + %d", dini_Int(i, "Copskill"));
                    return 1;
                }



Re: dini problem - MythicalMarauder - 25.03.2014

No need for this.
You can save your copskill with your player stats, and load them when he logs in.
Then use: pData[playerid][Copskill]++;
It's not that hard..


Re: dini problem - Konstantinos - 25.03.2014

What MythicalMarauder said is a better option that reading the file over and over again - that's the use of the variables (arrays for players)!

Your problem is that the first argument in dini_IntSet and dini_Int should be array (string) such as the file name but you used "i" which is an integer.