error with ini saving stats

Started by Kewun, Jul 15, 2016, 10:34 AM

Previous topic - Next topic

Kewun

SO, im trying to make a account system of Unique ID using the ini parser.
main problem is, that after a kill, im giving the killer +1 score and using SaveAccount ( killer )
function SaveAccount(player)
{
WriteIniInteger( "data/"+player.UniqueID+".ini", "acc", "score", player.Score)
}
There is a error that cannot open file data/ player uid.ini   in the server.exe
Screenshot:

http://imgur.com/btRouh9

i dont know how to fix :(


Finch Real

Have you loaded ini plugin? And do you have uid.ini file?
My Snipet Showroom

http://pastebin.com/5KKuU5cg

Kewun

ini plugin is loaded, i dont have uid ini file and idk how to create

KingOfVC

ini plugin wont automatic create .ini file, you must create it manually

Kewun

but how? if i use function file("blabla","w") on onPlayerJoin It will rewite it

Finch Real

No Open notepad add somethig inside it save it as uid.ini
My Snipet Showroom

http://pastebin.com/5KKuU5cg

Kewun

but man, i want make it working for all players, not just me :c its like account system, i dont want everytime create files manually

Finch Real

Wt* you have to create it once Then data willbe automatically inserted in hat with the code
My Snipet Showroom

http://pastebin.com/5KKuU5cg

DizzasTeR

Well you have to create the file manually through scripts @Kewun through squirrel's very own file functions since ini plugin doesn't create the file if its not there.

KAKAN

OldIni  <- WriteIni;
function WriteIni( .../* The params*/ )
{
file(filename,"a+").close();
OldIni( ... );
}
Just to get an idea :)
oh no

Kewun

Quote from: Doom_Kill3R on Jul 15, 2016, 12:38 PMWell you have to create the file manually through scripts @Kewun through squirrel's very own file functions since ini plugin doesn't create the file if its not there.
aaaaaaaaaah


now i know, i have to create a Accounts.ini, then put the player names, stats there right?

Kewun

ok, done, fixed.
thank you all