shavitush / bhoptimer

A bunnyhop timer plugin for Counter-Strike: Source, Counter-Strike: Global Offensive and Team Fortress 2.
https://timer.shav.it
GNU General Public License v3.0
230 stars 94 forks source link

CS:GO WR Not Updating #1075

Closed LightBasileus closed 2 years ago

LightBasileus commented 3 years ago

Using the latest version of the CS:GO Server. OS is Ubuntu 18.04.4 LTS Running latest versions of sourcemod (1.10) and metamod (1.11)

WR is not updating in top left hud or in the wr menu. The replay bot however is showing the replay of the newest wr. When installing bhoptimer, I received an error about the table playertimes. When I opened the database, I noticed that the playertimes table was not prefixed with an . After renaming the table to include the _, the error went away. But I'm wondering if thats whats causing my current issue.

Nairdaa commented 3 years ago

Post an error log please.

LightBasileus commented 3 years ago

I'll have to recreate it

LightBasileus commented 3 years ago

Heres the error, I should've checked.

L 09/07/2021 - 22:14:51: [shavit-wr.smx] Timer (WR OnFinish) SQL query failed. Reason: Cannot add or update a child row: a foreign key constraint fails (bhoptimer._playertimes, CONSTRAINT pt_auth FOREIGN KEY (auth) REFERENCES users (auth) ON DELETE CASCADE ON UPDATE CASCADE)

Nairdaa commented 3 years ago

SET GLOBAL FOREIGN_KEY_CHECKS=0;

try running this on your MySQL database and restart the server please

Nairdaa commented 3 years ago

However, it kinda looks like something went wrong during the tables creation process when you first installed the timer. Are you sure your mysql user has the correct auth set?

LightBasileus commented 3 years ago

I'm working on recreating the issue now so I can give you the original error. However, the mysql user has all privileges granted for the bhoptimer database.

Nairdaa commented 3 years ago

https://mms.alliedmods.net/mmsdrop/1.10/

Could you try newest 1.10 metamod instead?

Nairdaa commented 3 years ago

https://mms.alliedmods.net/mmsdrop/1.10/mmsource-1.10.7-git974-linux.tar.gz

LightBasileus commented 3 years ago

Edit: I can do that. Also, I tried to recreate the error and I want able to. If I have to I can just manually copy my data from my old database into the new one I created and go from there.

Nairdaa commented 3 years ago

No i mean try newest 1.10 (downgrade from 1.11).

LightBasileus commented 3 years ago

I understand, I reread your comment and realized what you were saying. Sorry.

Nairdaa commented 3 years ago

Ez :D

LightBasileus commented 3 years ago

I changed my metamod source to the version you gave me. And I ran that command on the database. I don't know if it changed anything. But then i started looking at the database compared to the other one I created to try and recreate the error I initally got and i realized i made a pretty big mistake. I must of tried making my database with a prefix at frist cause I have almost all my tables doubled besides the _playertimes table with no playertimes table. The _playertimes and _wrs look exactly thesame. Same columns and entries in both tables.

bhoptimer table tables

LightBasileus commented 3 years ago

I'm wondering if the_playertimes is suppose to be playertimes and the rest of the tables can be deleted.

LightBasileus commented 3 years ago

I was able to recreate the original error: L 09/12/2021 - 13:21:22: [shavit-timelimit.smx] Timer (TIMELIMIT time selection) SQL query failed. Reason: Table 'bhop._playertimes' doesn't exist

However, when I look at the tables in the database in mysql, the _playertimes table does exit.

Also, now i realize I had an _ in the shavit-prefix.cfg

Nairdaa commented 3 years ago

shavit-prefix.cfg should be empty, I don't understand how the _ landed there ;p

L 09/12/2021 - 13:21:22: [shavit-timelimit.smx] Timer (TIMELIMIT time selection) SQL query failed. Reason: Table 'bhop._playertimes' doesn't exist

This error means... What it says :P If i was you (and I assume that's a fresh server install, no?), I'd just remove everything timer related from the database and retry. That error should never happen if the tables were created properly during 1st server launch.

Nairdaa commented 3 years ago

One more question. Are you using the newest RELEASE of the timer, or compiled the newest files from master branch yourself?

LightBasileus commented 3 years ago

Well thats the thing. I created a new database and the table exists:

tableinbhop

And yes, I'm using version 3.0.6 and compiled all the files and put them in the plugins folder. The server was created about 4 days ago. Its up to date and I was playing on it till i noticed the wr wasnt updating but the replay bot was. Even after I deleted all the wr's the wr was still showing up on the top left and even had the wrong name once.

Nairdaa commented 3 years ago

Have you tried using the stable release instead of compiling newest files?

There might be something fucked with mysql, cus I'm encountering smiliar issue with the top left hud not showing up on Kawaii, while it works all just fine with 3.0.5 on Ultima...

LightBasileus commented 3 years ago

I'll give that a go. I'm going to try one more time on a completly refreshed version I have of bhoptimer and sourcemod. If that still gives me the same error than ill try using the precompiled files.

Nairdaa commented 3 years ago

btw what's your mysql version?

LightBasileus commented 3 years ago

Its 5.7.35-0ubuntu0.18.04.1.

I received the same error on newly refreshed files: L 09/12/2021 - 12:28:06: [shavit-timelimit.smx] Timer (TIMELIMIT time selection) SQL query failed. Reason: Table 'bhoptimertest.playertimes' doesn't exist

I'll try the precompiled files now.

Nairdaa commented 3 years ago

If your mysql setup isn't scuffed then I'm out of ideas.

LightBasileus commented 3 years ago

Same lol, I used the precompiled files this time. I got a wr, deleted it. The first line on the top left was deleted but the second one didnt disappear. When I got another wr, it didnt show up in the wr menu or on the top left.

LightBasileus commented 3 years ago

Also go the same error:

L 09/12/2021 - 14:08:37: [shavit-timelimit.smx] Timer (TIMELIMIT time selection) SQL query failed. Reason: Table 'bhoptimer2.playertimes' doesn't exist

table exists: bhoptimer2tables

Nairdaa commented 3 years ago

@rtldg halp

LightBasileus commented 3 years ago

Update: I tried using MariaDB and also did a clean install of MySQL. Both received the same error that Table 'bhoptimer2.playertimes' doesn't exist. MariaDB also threw an extra error:

L 09/14/2021 - 23:33:43: [shavit-rankings.smx] Timer (WR Holder Rank table creation 0/4) SQL query failed. Reason: View's SELECT contains a subquery in the FROM clause

I also tried using v3.0.5 but received the same error that the table doesn't exists.

LightBasileus commented 2 years ago

I started the server completely from scratch. It works now.