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

[Any][MySQL] tVip (2.3 | 04-04-21) - The simplest to use Vip Manager


Post New Thread Reply   
 
Thread Tools Display Modes
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 03-26-2017 , 18:57   Re: [Any][MySQL] tVip (1.6 | 31-03-17) - The simplest to use Vip Manager
Reply With Quote #51

What am I doing wrong? My DB is named tVip. I get this error in my logs:

Code:
L 03/26/2017 - 18:40:57: [SM] Exception reported: Invalid database Handle 0 (error: 4)
L 03/26/2017 - 18:40:57: [SM] Blaming: tvip.smx
L 03/26/2017 - 18:40:57: [SM] Call stack trace:
L 03/26/2017 - 18:40:57: [SM]   [0] SQL_SetCharset
L 03/26/2017 - 18:40:57: [SM]   [1] Line 44, C:\Users\ziegl\Dropbox\SourcePawnSP\tVIP\release\tVip.sp::OnPluginStart
My Database.cfg

Code:
"Databases"
{
    "driver_default"        "mysql"
    
    // When specifying "host", you may use an IP address, a hostname, or a socket file path
    

    "admins"
    {
        "driver"              "mysql"
        "host"                "45.32.210.187"
        "database"          "admins"
        "user"                "root"
        "pass"                "popcorn!"
        "port"                "3306"
    }


    "storage-local"
    {
        "driver"              "mysql"
        "host"                "45.32.210.187"
        "database"         "sourcemod_storage"
        "user"                "root"
        "pass"                "popcorn!"
        "port"                "3306"
    }

    
    "clientprefs"
    {
        "driver"              "mysql"
        "host"                "45.32.210.187"
        "database"          "clientprefs"
        "user"                "root"
        "pass"                "popcorn!"
        "port"                "3306"
    }

    "cksurf"
    {
        "driver"           "mysql"
        "host"             "45.32.210.187"
        "database"      "cksurf"
        "user"             "root"
        "pass"             "popcorn!"
        "port"             "3306"    
    }

    "store"
    {
        "driver"        "mysql"
        "host"          "45.32.210.187"
        "database"      "store"
        "user"          "root"
        "pass"          "popcorn!"
        "port"            "3306"
    }

    "jukebox"
    {
        "driver"        "mysql"
        "host"          "45.32.210.187"
        "database"      "jukebox"
        "user"          "root"
        "pass"          "popcorn!"
        "port"            "3306"
    }

    "tVip"
    {
        "driver"        "mysql"
        "host"          "45.32.210.187"
        "database"      "tVip"
        "user"          "root"
        "pass"          "popcorn!"
        "port"            "3306"
    }
}

Last edited by TrappaTroopa; 03-26-2017 at 18:59.
TrappaTroopa is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-27-2017 , 00:47   Re: [Any][MySQL] tVip (1.6 | 31-03-17) - The simplest to use Vip Manager
Reply With Quote #52

Quote:
Originally Posted by Totenfluch View Post
the best way to solve this would be to use zephs solution for it

https://github.com/dvarnai/store-plu...store.sp#L2289

we just store the SteamID starting at the 8th character so the id looks like X:XXXXXXXX

unfortunatly we have to use another database structure for this and convert/rebase the old database.
That'd be a wonderful update, if this is something you are willing to do.

Also, I got this, seems to be a mysql error:

Code:
L 03/26/2017 - 23:44:53: [tVip.smx] Too many keys specified; max 64 keys allowed
Just not sure why I got this, as I only have 2 database entries.
__________________

Last edited by sneaK; 03-27-2017 at 00:51.
sneaK is offline
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 03-27-2017 , 03:38   Re: [Any][MySQL] tVip (1.6 | 31-03-17) - The simplest to use Vip Manager
Reply With Quote #53

Quote:
That'd be a wonderful update, if this is something you are willing to do.

Also, I got this, seems to be a mysql error:
I'm asking myself if it's worth that everyone has to do new tables.
It wouldn't even be hard to implement it but I'm unsure whether or not it has enough merit to justify it.
If you make the changes and send a pull request I'll merge it. Otherwise it may take some weeks.

Quote:
L 03/26/2017 - 23:44:53: [tVip.smx] Too many keys specified; max 64 keys allowed
Yap. That happens when you try to ductape the database to work with new changes.

Why?
https://github.com/Totenfluch/tVip/c...ef0591fd3d3L54
Adds the Unique Index to an Existing table. But it always adds a new Key for every call.
So instead of fixing our old table ones it fucks it over completly... Sorry for that.

Reference: https://www.safaribooksonline.com/bl...keys-in-mysql/

I'll push a fix later today. Not sure how to do this without changing the mysql layout tho.
Spoiler


Quote:
What am I doing wrong? My DB is named tVip. I get this error in my logs:
There's probably no database called tVip on the Server where the tVip configuration points to.
__________________
Notable Projects:
Event Item Spawner | Scissors, Rock, Paper for ZephStore
tVip | Smart Link Remover
PLG & GGC - CS:GO Roleplay

and countless more...

I can make a helicopter shoot missles if you want me to...

Last edited by Totenfluch; 03-27-2017 at 04:01.
Totenfluch is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 03-27-2017 , 10:23   Re: [Any][MySQL] tVip (1.6 | 31-03-17) - The simplest to use Vip Manager
Reply With Quote #54

Quote:
Originally Posted by Totenfluch View Post
I'm asking myself if it's worth that everyone has to do new tables.
It wouldn't even be hard to implement it but I'm unsure whether or not it has enough merit to justify it.
If you make the changes and send a pull request I'll merge it. Otherwise it may take some weeks.

There's probably no database called tVip on the Server where the tVip configuration points to.
Actually there was. It finally saw the DB after I reboot the CS Server and the plugin created the tables. I am good now. Thanks.

Edit Actually it automatically created another tVip DB in the tVip DB I created manually. But the plugin works. why did it do this? See ScreenShot.
Attached Thumbnails
Click image for larger version

Name:	tVip DB.PNG
Views:	215
Size:	14.0 KB
ID:	161719  

Last edited by TrappaTroopa; 03-27-2017 at 10:58.
TrappaTroopa is offline
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 03-27-2017 , 13:55   Re: [Any][MySQL] tVip (1.8 | 27-03-17) - The simplest to use Vip Manager
Reply With Quote #55

Quote:
Edit Actually it automatically created another tVip DB in the tVip DB I created manually. But the plugin works. why did it do this? See ScreenShot.
Well.

Let me Explain MySQL to you.

You have a MySQL Server.
A MySQL Server has databases. In your case those are for example: "admins", "store", "tVip".
Those databases contain Tables. like the tVip Database contains the tVip table.
In that table there are the actual columns. In those columns there is the Data.

YOU CANNOT HAVE ACTUAL DATA IN DATABASES. This is not how MySQL works.
You could have stored all data in one database. Since only the tables are relevant. But that's another story

If you are more interested in it, google a bit around.
You setup seems wierd but no unreasonable.
Everything in there is like it should be.
__________________
Notable Projects:
Event Item Spawner | Scissors, Rock, Paper for ZephStore
tVip | Smart Link Remover
PLG & GGC - CS:GO Roleplay

and countless more...

I can make a helicopter shoot missles if you want me to...

Last edited by Totenfluch; 03-27-2017 at 13:57.
Totenfluch is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 03-27-2017 , 14:30   Re: [Any][MySQL] tVip (1.8 | 27-03-17) - The simplest to use Vip Manager
Reply With Quote #56

Quote:
Originally Posted by Totenfluch View Post
Well.

Let me Explain MySQL to you.

You have a MySQL Server.
A MySQL Server has databases. In your case those are for example: "admins", "store", "tVip".
Those databases contain Tables. like the tVip Database contains the tVip table.
In that table there are the actual columns. In those columns there is the Data.

YOU CANNOT HAVE ACTUAL DATA IN DATABASES. This is not how MySQL works.
You could have stored all data in one database. Since only the tables are relevant. But that's another story

If you are more interested in it, google a bit around.
You setup seems wierd but no unreasonable.
Everything in there is like it should be.
First of all I know a lot about MySQL. Don't try to explain to me how a MySQL DB works. I setup this MySQL instance myself.

Second if you understood how SM plugins worked and what the Databases.cfg does you would understand that it is better to have each plugin create their tables in their own DB.

Otherwise you would have all you tables mixed together from all your plugins in 1 single DB. I don't want my "admins" DB tables mixed with tVip tables. I have multiple CS Servers and multiple Plugins. This would not be acceptable.

My "Setup" Is how everyone does it.

Now my mistake was thinking that the "extra tVip DB'" was another DB. It is actually a table. I was tired last night and was crossedeyed. I expected there to be more tables within the "extra tVip DB'.

Last edited by TrappaTroopa; 03-27-2017 at 14:47.
TrappaTroopa is offline
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 03-27-2017 , 14:50   Re: [Any][MySQL] tVip (1.8 | 27-03-17) - The simplest to use Vip Manager
Reply With Quote #57

Quote:
Originally Posted by TrappaTroopa View Post
First of all I know a lot about MySQL. Don't try to explain to me how a MySQL DB works. I setup this MySQL instance myself.

Second if you understood how SM plugins worked and what the Databases.cfg does you would understand that it is better to have each plugin create their tables in their own DB.

Otherwise you would have all you tables mixed together from all your plugins in 1 single DB. I don't want my "admins" DB tables mixed with tVip tables. I have multiple CS Servers and multiple Plugins. This would not be acceptable.

My "Setup" Is how everyone does it.

Now my mistake was thinking that the "extra tVip DB'" was another DB. It is actually a table. I was tired last night and was crossedeyed. I expected there to be more tables within the "extra tVip DB'.
Well - no offense - you asked and there's a bunch of people that don't know how it works.

------------------

https://github.com/Totenfluch/tVip/c...d0e382e3ba77b3

2.0 is live ; now truly supports all games - at once and some bugfixes.
if you run into a bug file an issue or post here
To update you need to drop your table
__________________
Notable Projects:
Event Item Spawner | Scissors, Rock, Paper for ZephStore
tVip | Smart Link Remover
PLG & GGC - CS:GO Roleplay

and countless more...

I can make a helicopter shoot missles if you want me to...

Last edited by Totenfluch; 03-28-2017 at 08:50.
Totenfluch is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-28-2017 , 03:51   Re: [Any][MySQL] tVip (2.0 | 27-03-17) - The simplest to use Vip Manager
Reply With Quote #58

Tested 2.0 with a couple users, seems to be working very well without issue. Thanks for the awesome update!
__________________
sneaK is offline
kamild1996
Senior Member
Join Date: May 2011
Old 04-02-2017 , 12:46   Re: [Any][MySQL] tVip (2.0 | 27-03-17) - The simplest to use Vip Manager
Reply With Quote #59

That's odd. I can't compile your plugin. It's just stuck forever at "//// tVip.sp", and that's it.
I used this autoexecconfig include (since there are more than one): https://forums.alliedmods.net/showthread.php?t=204254

Scratch that, I'm dumb, I didn't download the include file properly.

Also thank you a lot for your plugin, it will make things much easier I wish it would support defining days instead of months, since I'm also offering donator perks for 14 days...

Last edited by kamild1996; 04-02-2017 at 13:40.
kamild1996 is offline
lilpetri
Member
Join Date: Nov 2016
Location: The Netherlands
Old 04-03-2017 , 10:45   Re: [Any][MySQL] tVip (2.0 | 27-03-17) - The simplest to use Vip Manager
Reply With Quote #60

Getting this error when executing sm_addvip:

Quote:
L 04/03/2017 - 16:41:46: [SM] Exception reported: Invalid client index 0
L 04/03/2017 - 16:41:46: [SM] Blaming: tVip.smx
L 04/03/2017 - 16:41:46: [SM] Call stack trace:
L 04/03/2017 - 16:41:46: [SM] [0] ThrowError
L 04/03/2017 - 16:41:46: [SM] [1] Line 71, C:\Users\Christian\Dropbox\SourcePawnSP\IDE_S P\scripting\include\multicolors/colors.inc::C_PrintToChat
L 04/03/2017 - 16:41:46: [SM] [2] Line 50, C:\Users\Christian\Dropbox\SourcePawnSP\IDE_S P\scripting\include\multicolors.inc::CPrintTo Chat
L 04/03/2017 - 16:41:46: [SM] [3] Line 131, C:\Users\Christian\Dropbox\SourcePawnSP\tVIP\ release\tVip.sp::cmdAddVip
And what do I enter for "<name>"?

Edit:

I can add VIPs via sm_tvip but it does not seem to work with Custom Chat Colors and TogsClanTags.

Last edited by lilpetri; 04-03-2017 at 11:54.
lilpetri is offline
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 06:28.


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