Closed chycken closed 8 months ago
you can provide your database.json file by deleting the database data
Deleted, and the error gone. Is that a problem if I leave the created database.json file as it was? Dont have mysql database
A database is required to use this plugin
Yes I see because I cant add any admin. Created a mysql database from hosting webadmin, and still got error messages that mini admin plugin cant connect to mysql. This is my file:
{ "Connection": { "Host": "mysql8.srkhost.eu:3306", "Database": "s42680_admin", "User": "myusername", "Password": "my password" } }
Is it correct like this?
try replacing mysql8.srkhost.eu:3306 by mysql8.srkhost.eu
Its working, connected to the database. Thanks. When I add someone to the admin list, I got this: css_addadmin "Csirke" "STEAM0:1:84806540" "0" System.Data.DataException: Error parsing column 4 (EndTime=11/7/2023 10:59:53PM - DateTime) ---> System.InvalidCastException: Unable to convert MySQL date/time to System.DateTime, set AllowZeroDateTime=True or ConvertZeroDateTime=True in the connection string. See https://mysqlconnector.net/connection-options/ at MySqlConnector.ColumnReaders.TextDateTimeColumnReader.ParseDateTime(ReadOnlySpan`1 data, Boolean convertZeroDateTime, Boolean allowZeroDateTime, DateTimeKind dateTimeKind) in //src/MySqlConnector/ColumnReaders/TextDateTimeColumnReader.cs:line 40 at MySqlConnector.Core.Row.GetValue(Int32 ordinal) in //src/MySqlConnector/Core/Row.cs:line 95 at Deserialize444e693b-baaf-4ab7-ac9e-c6be0c5a312f(DbDataReader) --- End of inner exception stack trace --- at Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value) in //Dapper/SqlMapper.cs:line 3911 at Deserialize444e693b-baaf-4ab7-ac9e-c6be0c5a312f(DbDataReader) at Dapper.SqlMapper.QueryRowImpl[T](IDbConnection cnn, Row row, CommandDefinition& command, Type effectiveType) in /_/Dapper/SqlMapper.cs:line 1288 at MiniAdmin.MiniAdmin.IsAdminExist(String steamId) at MiniAdmin.MiniAdmin.AddAdmin(Admins admin)
And !slay !admin ect. commands are not working ingame.
try installing the latest version
You'll just have to delete the old database
When I add an admin with time "0" (permanently) than it doesnt work. Maybe should I change something in my mysql database?
Sorry, I made a mistake in the code and it just deletes you immediately. I'll fix it.
Try this version
still got this: css_addadmin "csirke" "STEAM_0:1:84806540" "100" System.Data.DataException: Error parsing column 3 (StartTime=STEAM0:1:84806540 - String) ---> System.InvalidCastException: Unable to convert MySQL date/time to System.DateTime, set AllowZeroDateTime=True or ConvertZeroDateTime=True in the connection string. See https://mysqlconnector.net/connection-options/ at MySqlConnector.ColumnReaders.TextDateTimeColumnReader.ParseDateTime(ReadOnlySpan`1 data, Boolean convertZeroDateTime, Boolean allowZeroDateTime, DateTimeKind dateTimeKind) in //src/MySqlConnector/ColumnReaders/TextDateTimeColumnReader.cs:line 40 at MySqlConnector.Core.Row.GetValue(Int32 ordinal) in //src/MySqlConnector/Core/Row.cs:line 95 at Deserialize1d629c68-a576-4eea-a4e5-1999814aa010(DbDataReader) --- End of inner exception stack trace --- at Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value) in //Dapper/SqlMapper.cs:line 3911 at Deserialize1d629c68-a576-4eea-a4e5-1999814aa010(DbDataReader) at Dapper.SqlMapper.QueryRowImpl[T](IDbConnection cnn, Row row, CommandDefinition& command, Type effectiveType) in /_/Dapper/SqlMapper.cs:line 1288
and you deleted the old database?
Yes
It's just that when I checked I didn't get any errors popping up, and I can't figure out what's wrong :(
Could you send me a screenshot of the database? Something like this:
Na, Ive deleted the entire database, created a new one, and voala..its working! Thank you very much! One more question: is it possible to create an admin menu above the chat (just like in sourcemod) ?
Well, as in csgo menu can not be done, you can do in chat, but whether it is convenient) I do not know
Failed to load plugin /home/container/game/csgo/addons/counterstrikesharp/plugins/MiniAdmin/MiniAdmin.dll with error System.Text.Json.JsonException: 'm' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: 9 | BytePositionInLine: 0.
Whats the method?