Raised This Month: $12 Target: $400
 3% 

OciXCrom's Rank System [XP|Levels|Ranks]


Post New Thread Reply   
 
Thread Tools Display Modes
xeloxded
Member
Join Date: Dec 2016
Old 07-03-2018 , 13:37   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #21

For some reason sometimes it wont save my exp correctly, it will reset to 0, yesterday i gave myself 1000 exp but then (next day) it was on 0 again
SAVE_TYPE = 0
Using same nick

EDIT: On change map it will save but if I turn off server it will reset

Last edited by xeloxded; 07-03-2018 at 16:09.
xeloxded is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-03-2018 , 19:04   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #22

How are you turning off your server exactly? If you're not doing it properly, the plugin won't be able to save the data.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xeloxded
Member
Join Date: Dec 2016
Old 07-03-2018 , 19:26   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #23

Well, just closing it, but what do you mean "correctly" I mean, what if ""for some reason"" server gets shutdown (power went off, DDOS), it will loss data, not sure but I dont think thats right.
or when do you need to restart your server for whatever reason (Installing a new module or maintenance, for example)

Last edited by xeloxded; 07-03-2018 at 19:26.
xeloxded is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-04-2018 , 08:10   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #24

"Just closing it" by pressing the X button is not considered a proper shutdown. This won't call any of the plugin's functions which need to detect when the map ends and the players disconnect to save the data. Not only this plugin, but none of your plugins that save stuff in the end will save them. Use the "exit" command to shut it down and "restart" to restart it.
__________________

Last edited by OciXCrom; 07-04-2018 at 08:10.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xeloxded
Member
Join Date: Dec 2016
Old 07-04-2018 , 08:16   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #25

Thats what I did, but still, for some reason EXP will go to 0 regardless.
I was testing with SteamID but it will save correctly

Also it makes no sense, because i am playing x map, got 10 exp and then change map it will save then close or rr server and it will go to 0 again

Last edited by xeloxded; 07-04-2018 at 08:20.
xeloxded is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-04-2018 , 08:46   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #26

Not sure why that is happening. I added some logs in the code that will print what's going in the logs/crxranks.log file. Leave it running for a while and upload the log file when you experience this again.

I'll upload the code in pastebin, since alliedmods has a weird bug at the moment - https://pastebin.com/9r9jEeTG
__________________

Last edited by OciXCrom; 07-04-2018 at 08:47.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xeloxded
Member
Join Date: Dec 2016
Old 07-04-2018 , 12:33   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #27

Quote:
L 07/04/2018 - 12:24:29: Log file started (file "cstrike/addons/amxmodx/logs/crxranks.log") (game "cstrike") (amx "1.8.3-dev+5154")
L 07/04/2018 - 12:24:29: Plugin precache started.
L 07/04/2018 - 12:240: Plugin init started.
L 07/04/2018 - 12:241: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:243: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:245: Deathrun [BOT] connected.
L 07/04/2018 - 12:247: Loading data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:24:56: Deathrun [BOT] disconnected.
L 07/04/2018 - 12:24:56: Saving data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:24:56: TEST [STEAM_0:0:173190571] disconnected.
L 07/04/2018 - 12:24:56: Saving data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:24:56: The plugin has ended.
L 07/04/2018 - 12:250: Plugin precache started.
L 07/04/2018 - 12:250: Plugin init started.
L 07/04/2018 - 12:251: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:253: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:255: Deathrun [BOT] connected.
L 07/04/2018 - 12:257: Loading data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:26:55: Plugin precache started.
L 07/04/2018 - 12:26:55: Plugin init started.
L 07/04/2018 - 12:26:56: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:26:58: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:27:00: Deathrun [BOT] connected.
L 07/04/2018 - 12:27:02: Loading data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:27:43: Plugin precache started.
L 07/04/2018 - 12:27:43: Plugin init started.
L 07/04/2018 - 12:27:44: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:27:45: TEST [STEAM_0:0:173190571] disconnected.
L 07/04/2018 - 12:27:45: Saving data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:27:45: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:27:46: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:27:48: Loading data for TEST [STEAM_0:0:173190571]
Maybe it has something to do with the fact that Deathrun comes with a BOT?
I just did the following, choose a map, give 100 exp, change to the same map while being connected, 100 exp still, then restart sv, 0 EXP.

Last edited by xeloxded; 07-04-2018 at 12:37.
xeloxded is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-04-2018 , 13:04   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #28

Let's add some colors to those logs so we can easily find what we need.

Quote:
L 07/04/2018 - 12:24:29: Log file started (file "cstrike/addons/amxmodx/logs/crxranks.log") (game "cstrike") (amx "1.8.3-dev+5154")
L 07/04/2018 - 12:24:29: Plugin precache started.
L 07/04/2018 - 12:24:30: Plugin init started.
L 07/04/2018 - 12:24:31: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:24:33: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:24:35: Deathrun [BOT] connected.
L 07/04/2018 - 12:24:37: Loading data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:24:56: Deathrun [BOT] disconnected.
L 07/04/2018 - 12:24:56: Saving data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:24:56: TEST [STEAM_0:0:173190571] disconnected.
L 07/04/2018 - 12:24:56: Saving data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:24:56: The plugin has ended.
L 07/04/2018 - 12:25:30: Plugin precache started.
L 07/04/2018 - 12:25:30: Plugin init started.
L 07/04/2018 - 12:25:31: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:25:33: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:25:35: Deathrun [BOT] connected.
L 07/04/2018 - 12:25:37: Loading data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:26:55: Plugin precache started.
L 07/04/2018 - 12:26:55: Plugin init started.
L 07/04/2018 - 12:26:56: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:26:58: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:27:00: Deathrun [BOT] connected.
L 07/04/2018 - 12:27:02: Loading data for Deathrun Sunshine [BOT]
L 07/04/2018 - 12:27:43: Plugin precache started.
L 07/04/2018 - 12:27:43: Plugin init started.
L 07/04/2018 - 12:27:44: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:27:45: TEST [STEAM_0:0:173190571] disconnected.
L 07/04/2018 - 12:27:45: Saving data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:27:45: TEST [STEAM_0:0:173190571] connected.
L 07/04/2018 - 12:27:46: Loading data for TEST [STEAM_0:0:173190571]
L 07/04/2018 - 12:27:48: Loading data for TEST [STEAM_0:0:173190571]
You can clearly see that your server isn't behaving properly. The functions that are called when the server starts (the plugin precache and plugin init messages) are printed 4 times in the file, but the function that is supposed to be called when the plugin ends (the plugin has ended message) is called only once. This means that out of 4 map changes, only 1 was successful and the data was saved there. During the other 3 changes, no data was saved because the server didn't change the map properly. As you can see the data wasn't saved in these cases either. You probably have some plugin that is crashing the server when the map ends or causing some other kind of problem. This is not something that I can fix because the problem is not in this plugin.
__________________

Last edited by OciXCrom; 07-04-2018 at 13:05.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
xeloxded
Member
Join Date: Dec 2016
Old 07-04-2018 , 13:15   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #29

I have nothing else more than Deathrun Manager, your custom chat, Ranks and Knife there (and Joropito multimod) so yeah, not sure what is going on

Its strange too because even if the data wasnt saved later, first map I testeed was where I gave me EXP and then it saved correctly

Last edited by xeloxded; 07-04-2018 at 13:19.
xeloxded is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-04-2018 , 15:30   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #30

The Deathrun Manager itself can be causing the problem - if I recall correctly, its code isn't very good. I suggest you disable any other plugins and enable them 1 by 1 to see which one is causing the problem. You can use the error logs generated from my plugin to help you in the process.
__________________

Last edited by OciXCrom; 07-04-2018 at 15:30.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode