SA-MP Forums Archive
Won't Save - 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: Won't Save (/showthread.php?tid=405034)



Won't Save - DJTunes - 05.01.2013

Hello, I'm trying to get score to save. How would I do this?

Could I get an exact pawno code?


Re: Won't Save - CBCandyBoy - 05.01.2013

take this

https://sampforum.blast.hk/showthread.php?tid=84332


Re: Won't Save - DJTunes - 05.01.2013

pawn Код:
C:\Users\Zach\Documents\MW\MW1.pwn(98) : warning 217: loose indentation
C:\Users\Zach\Documents\MW\MW1.pwn(106) : warning 217: loose indentation
C:\Users\Zach\Documents\MW\MW1.pwn(258) : error 017: undefined symbol "BurridgeConnect"
C:\Users\Zach\Documents\MW\MW1.pwn(273) : error 017: undefined symbol "BurridgeDisconnect"
C:\Users\Zach\Documents\MW\MW1.pwn(118) : warning 204: symbol is assigned a value that is never used: "MyText"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: Won't Save - DJTunes - 05.01.2013

Couldn't I just add something like this into my script to get it working:
pawn Код:
OnPlayerDisconnect
dini_IntSet(file, "Score", GetPlayerScore(playerid));

OnPlayerLogin(playerid,password[])
SetPlayerScore(playerid, dini_Int(file,"Score"));



Re: Won't Save - CBCandyBoy - 05.01.2013

yes u can add as u wish

btw its better u use a fs i also use that to save my score and money that works 100% fine for me

Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 43 seconds.




Re: Won't Save - RajatPawar - 05.01.2013

Yeah, it's pretty simple to make ^, you could use SQL, much easier, your choice though! No need for a include/fs imo but as per your choice!


Re: Won't Save - DJTunes - 05.01.2013

Where would I put it at?
pawn Код:
OnPlayerDisconnect
dini_IntSet(file, "Score", GetPlayerScore(playerid));

OnPlayerLogin(playerid,password[])
SetPlayerScore(playerid, dini_Int(file,"Score"));



Re: Won't Save - Konstantinos - 05.01.2013

I think it says!
pawn Код:
//OnPlayerDisconnect
dini_IntSet(file, "Score", GetPlayerScore(playerid));

//OnPlayerLogin(playerid,password[])
SetPlayerScore(playerid, dini_Int(file,"Score"));



Re: Won't Save - DJTunes - 05.01.2013

pawn Код:
C:\Users\Zach\Documents\MW\MW1.pwn(98) : warning 217: loose indentation
C:\Users\Zach\Documents\MW\MW1.pwn(106) : warning 217: loose indentation
C:\Users\Zach\Documents\MW\MW1.pwn(272) : error 017: undefined symbol "dini_IntSet"
C:\Users\Zach\Documents\MW\MW1.pwn(471) : error 021: symbol already defined: "SetPlayerScore"
C:\Users\Zach\Documents\MW\MW1.pwn(118) : warning 204: symbol is assigned a value that is never used: "MyText"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: Won't Save - RajatPawar - 05.01.2013

Did you include dini at the top of your script?