VIP-Core icon indicating copy to clipboard operation
VIP-Core copied to clipboard

SQL Error

Open SSadistic opened this issue 9 years ago • 33 comments

SQL_Callback_SelectVipPlayers: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0, 60' at line 1

SSadistic avatar Oct 30 '17 17:10 SSadistic

How VIP-Core version?

R1KO avatar Oct 30 '17 18:10 R1KO

[VIP] Core 3.0 DEV #17

I deleted the old "vip_users" and "vip_overrides" because of that change "Теперь игроки хранятся в базе по AccountID." and I needed a new database. And I get that error when I try to list players.

SSadistic avatar Oct 30 '17 18:10 SSadistic

  1. Set value 1 https://github.com/R1KO/VIP-Core/blob/new-style/addons/sourcemod/scripting/VIP_Core.sp#L11
  2. Compile
  3. Test and give me VIP_Debug.log (in addons/sourcemod/logs/)

R1KO avatar Oct 30 '17 18:10 R1KO

L 10/30/2017 - 20:47:53: [vipsystem/VIP_Core.smx] SELECT o.group, o.expires, u.name, u.account_id, u.id FROM vip_users AS u LEFT JOIN vip_overrides AS o ON o.user_id = u.id WHERE o.server_id = 1 AND u.id = 2 LIMIT 1; L 10/30/2017 - 20:47:53: [vipsystem/VIP_Core.smx] SetValue(Time) = 1509392824 L 10/30/2017 - 20:47:53: [vipsystem/VIP_Core.smx] GetValue(Time) = 1509392824 L 10/30/2017 - 20:48:05: [vipsystem/VIP_Core.smx] MenuHandler_VipClientInfoMenu->MenuCancel_ExitBack L 10/30/2017 - 20:48:05: [vipsystem/VIP_Core.smx] GetValue(MenuListType) = 2 L 10/30/2017 - 20:48:06: [vipsystem/VIP_Core.smx] SELECT u.id, u.name FROM vip_users AS u LEFT JOIN vip_overrides AS o ON o.user_id = u.id WHERE o.server_id = 1LIMIT 0, 60;

SSadistic avatar Oct 30 '17 18:10 SSadistic

Also: https://i.imgur.com/G68nns5.jpg

This is very bugged too. Name: 0, Group: My SteamID, Expires: The Vip group, Identifier: Expires in

SSadistic avatar Oct 30 '17 18:10 SSadistic

Fix: Add space before LIMIT https://github.com/R1KO/VIP-Core/blob/new-style/addons/sourcemod/scripting/vip/adminmenu/List.sp#L219

About the fact that instead of nickname the symbol 0 I know. If you do not mind creating a new issue with this problem

R1KO avatar Oct 30 '17 18:10 R1KO

From:

  										LIMIT %d, %d;", 

To:

  										 LIMIT %d, %d;", 

?

Or add space like the word space.

SSadistic avatar Oct 30 '17 20:10 SSadistic

yes LIMIT %d, %d; -> LIMIT %d, %d;

R1KO avatar Oct 30 '17 21:10 R1KO

Those spaceings here are so bugged ffs... So I need to do that:

https://i.imgur.com/6UQ7bBv.gif

Or I got you wrong

SSadistic avatar Oct 30 '17 21:10 SSadistic

yes

R1KO avatar Oct 30 '17 22:10 R1KO

Well, I still get:

L 10/31/2017 - 00:30:38: [vipsystem/VIP_Core.smx] SQL_Callback_SelectVipPlayers: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0, 60' at line 1

SSadistic avatar Oct 30 '17 22:10 SSadistic

Test this version http://joxi.ru/V2VvvxdU0WM7j2

R1KO avatar Oct 30 '17 22:10 R1KO

https://i.imgur.com/J3hY3hX.jpg

I guess those zeroes are from the other problem. Also - can I have the plugins with Выход changed to Exit? I used to change it myself from the Info.sp, but I don't have it now.

SSadistic avatar Oct 30 '17 22:10 SSadistic

I'll fix it now

R1KO avatar Oct 30 '17 23:10 R1KO

https://github.com/R1KO/VIP-Core/commit/8652ccdc2317e4fb3847e27e70c41c8628699da8 And https://github.com/R1KO/VIP-Core/commit/272ccb5128a22843201e96a616bb5c31b09d8b8c

R1KO avatar Oct 30 '17 23:10 R1KO

@SSadistic Test this http://joxi.ru/bmobbD0CM0kJPr and me full VIP_Debug.log Try adding a VIP player.

R1KO avatar Oct 30 '17 23:10 R1KO

https://pastebin.com/7da48rBA

SSadistic avatar Oct 30 '17 23:10 SSadistic

in the database and menu the normal name?

R1KO avatar Oct 30 '17 23:10 R1KO

I can't access the DB now, but the VIP is added as it should be. Still zeroes in listing players.

SSadistic avatar Oct 30 '17 23:10 SSadistic

In which case does the name change to 0?

R1KO avatar Oct 30 '17 23:10 R1KO