AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   GunGame (https://forums.alliedmods.net/forumdisplay.php?f=104)
-   -   [solved] Sql-problem with stats and bots (https://forums.alliedmods.net/showthread.php?t=330259)

Mordekay 01-26-2021 13:01

[solved] Sql-problem with stats and bots
 
1 Attachment(s)
I'm getting this error on every map change:
Code:

L 01/26/2021 - 18:52:56: [gungame.amxx] Could not execute query [INSERT INTO `gg_stats` (authid,name,timestamp,wins,points,streak,serverip) VALUES ('BOT','Deadlynome','1611683576','0','21','0','89.163.190.40:27515'),('BOT','Firestorm','1611683576','0','21','0','89.163.190.40:27515'),('BOT','bussemann','1611683576','0',] -- err #1062 [Duplicate entry 'BOT-89.163.190.40:27515' for key 'PRIMARY']
status

meta list

amxx list

I'm using the original gungame 2.13c except added 2 letters in client_disconnected-funktion to prevent the warning.

Shadows Adi 01-26-2021 13:11

Re: Sql-problem with stats and bots
 
The error provides from duplicate entry:

"[Duplicate entry 'BOT-89.163.190.40:27515' for key 'PRIMARY']"

Because Bots have as steamid 'BOT' and a PRIMARY KEY in MySQL can't be duplicated: PRIMARY KEY(`authid`,`serverip`) see line 8467 in gungame.sma.

Mordekay 01-26-2021 14:51

Re: Sql-problem with stats and bots
 
How to fix it?

Shadows Adi 01-26-2021 15:52

Re: Sql-problem with stats and bots
 
Well, try setting PRIMARY KEY(`authid`,`serverip`) in PRIMARY KEY(`name`,`serverip`)

Mordekay 01-26-2021 16:44

Re: Sql-problem with stats and bots
 
If I could change the code I would not have asked (or not here but in scripting help) :wink:

EDIT: Memo to self: read the f**ing cvars:
Quote:

Originally Posted by cvars
gg_ignore_bots (default: 0)

If set to 1, bot wins and points are not saved. If set to 2, bots can't even trigger a win, unless there are no human players in the server, in addition to their wins and points not being saved.

So: solved


All times are GMT -4. The time now is 04:11.

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