Y_INI Stats Problem.
#1

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

Quote:
Originally Posted by gatenosix
Посмотреть сообщение
[..]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
Reply
#3

Empty your variables under OnPlayerDisconnect.

I.E:

Код:
enum player
{
canfly,
}
Код:
public OnPlayerDisconnect
{
//save stuff
Player[playerid][canfly] = 0;
return 1;
}
Reply
#4

@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.
Reply
#5

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
@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.
Reply
#6

Oh right, understood. Thanks for that clarification. I think I misunderstood you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)