Won't Save
#1

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

Could I get an exact pawno code?
Reply
#2

take this

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

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

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"));
Reply
#5

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.

Reply
#6

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!
Reply
#7

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

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

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

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

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

Did you include dini at the top of your script?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)