Forum

> > CS2D > Scripts > Save System
Forums overviewCS2D overview Scripts overviewLog in to reply

English Save System

21 replies
Page
To the start Previous 1 2 Next To the start

old Re: Save System

Raaj Nadar
User Off Offline

Quote
Lecram you can add solved tag to this topic.

Wait a minute i found out what happens when a connection times out or unable to connect and why the stats gets nil.

If player tries to join any error like connection timeout / unble to connect/ user cancels connection.

most of the scripts loads file after the players 1st spawn or he joins a team when ever we join a server we are added to spec team that is team 0.

but in this case user not joined but not added to team.

so the server pretends as if the player was there and checks for files it gets the file but the problem is whenever we leave our stats are returned to nil which is compulsion to prevent error.

Now no files loaded so the server thinks the stats are nil for it saves the default value to the file.

if you want to check test it did with zombie plague script.
And i was surprises to see this.

i hope the explanation was easy to understand.
edited 1×, last 12.01.15 11:25:09 am

old Re: Save System

Ajmin
User Off Offline

Quote
I already explained this.
Even the "Join" hook will not be triggered while a player verify his stats .

Join--->Load
So if the join hook is not triggered load will not take place and if player leaves the server while verifying it triggers "Leave" hook.

Leave ----> Save

Before loading if player leaves his stats will be saved as default [probably 0]

Players leaves without joining ! -- This causes everything.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview