PDA

View Full Version : Y_INI Stats Problem.


gatenosix
14/04/2014, 10:43 PM
Hello,

I use Y_INI and everything seems fine with saving the information. However, there is a random problem where if a user creates an account, they may acquire the stats, partially or wholly, from an existing player. This is obviously a massive problem. I have no idea what code to post so if you request it, I will willingly post it.

Thanks!

Ada32
14/04/2014, 10:52 PM
[..]if a user creates an account, they may acquire the stats, partially or wholly, from an existing player

like a random player? lets see how you load the data

bool
14/04/2014, 11:00 PM
Empty your variables under OnPlayerDisconnect.

I.E:


enum player
{
canfly,
}


public OnPlayerDisconnect
{
//save stuff
Player[playerid][canfly] = 0;
return 1;
}

PrivatioBoni
14/04/2014, 11:03 PM
@bool:

That would of course work for stuff which you don't want to have on connect (e.g. unanswered questions) however surely that would just cause the player to have reset stats when they login/connect? That wouldn't help, unless I misunderstood something.

bool
14/04/2014, 11:05 PM
@bool:

That would of course work for stuff which you don't want to have on connect (e.g. unanswered questions) however surely that would just cause the player to have reset stats when they login/connect? That wouldn't help, unless I misunderstood something.

When they disconnect you save their stuff, then empty the variables.

When they connect, you load the stuff as per usual.


It wouldn't reset.

PrivatioBoni
14/04/2014, 11:06 PM
Oh right, understood. Thanks for that clarification. I think I misunderstood you!