Forum

> > CS2D > Scripts > Save System
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Save System

21 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: Save System

Raaj Nadar
User Off Offline

Zitieren
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.
1× editiert, zuletzt 12.01.15 11:25:09

alt Re: Save System

Ajmin
User Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht