ULX

Poll

Would this be useful for you?

Yes
No

Author Topic: ULX MySQLOO  (Read 70745 times)

0 Members and 1 Guest are viewing this topic.

Offline SatoshiAaron

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: ULX MySQLOO
« Reply #30 on: August 15, 2013, 03:51:18 AM »
How do we install MySQLOO... I have the plugin installed here, but I can't find the MySQLOO that is required!

ms333

  • Guest
Re: ULX MySQLOO
« Reply #31 on: August 15, 2013, 04:45:28 AM »
How do we install MySQLOO... I have the plugin installed here, but I can't find the MySQLOO that is required!

http://facepunch.com/showthread.php?t=1220537

Offline Organik

  • Newbie
  • *
  • Posts: 27
  • Karma: 1
    • Artifice Gaming Network
Re: ULX MySQLOO
« Reply #32 on: August 15, 2013, 01:07:46 PM »
I managed to get it mostly working but I still have one problem.

I got rid of all the errors by wrapping the code in an "if SERVER then" if statement. But I still had issues with the script adding the user to the correct usergroup when they joined (saving the groups works fine, but if the player joins the server with a usergroup that doesn't match the database, their usergroup would not change). I fixed this by changing:

"ulx.adduserids(nil,ply:SteamID(),D.groups)"

to

"ulx.adduserid(nil,ply:SteamID(),D.groups)"

Now the script works as I want it to but there is one issue.

My ulx menu seems to fail to load a lot of data. There are no maps in the maps list. There are no adverts in the adverts list (although adverts still display in chat). In the sandbox subtab of the settings tab, no sliders are appearing. In the group manager menu, group members are not appearing, and permissions are not appearing.

I've done some testing over the past few hours and the problems stated above seem to be from the fact I changed "ulx.adduserids(nil,ply:SteamID(),D.groups)" to "ulx.adduserid(nil,ply:SteamID(),D.groups)". If I change it back, all the information is displayed correctly, however the script doesn't change users usergroups.

Any help is appreciated.

Thanks

This is the exact same conclusion I've come to see as well. It would be nice if we can get one of the lua pro's on here to run through and update this script. Or maybe just shed some light on the issue at hand.

Offline rainbow Dash

  • Newbie
  • *
  • Posts: 35
  • Karma: -2
  • Owner of Friendship is Gaming Servers
    • Friendship is Gaming
Re: ULX MySQLOO
« Reply #33 on: August 22, 2013, 12:54:33 AM »
This is the exact same conclusion I've come to see as well. It would be nice if we can get one of the lua pro's on here to run through and update this script. Or maybe just shed some light on the issue at hand.
Quote
lua pro's on here to run through and update this script...

If only that would happen... I so desperately want need this for my PHP Forum Signature thing im making (which loves grayscaling )
Uhm, whats a signature?

Offline MKServers

  • Newbie
  • *
  • Posts: 10
  • Karma: 3
Re: ULX MySQLOO
« Reply #34 on: August 23, 2013, 04:24:50 PM »
Sorry all, I have been really busy recently but finally I am at a point where I can take a hour or so and update the code for GMod 13 correctly with create table abilities. Will edit this post as soon as I finish it. Will also be testing everything to make sure everything works because I shouldn't be screwing anyone over.

EDIT:
Also, I was really stupid and made a custom function outside of this file called ulx.adduserids(). I am making a new custom function WITHIN THIS FILE so it will avoid displaying chat and still update. I am still reading through other peoples errors and fixing them as I fix this script up.

I think this has been approached wrong.

In my opinion, It would be much better if this didn't read the ranks from the external database, but rather synced the local data file with the remote database whenever a player's rank changes, or a player connects. This way, any connection problems can be overlooked quite easily, and cause minimal disruptions for the server in the event of a failed connection, as the remote database would simply become a backup, only with the added feature of being able to display a players rank in a loadingurl.

How one would go about doing this, is beyond me. I have ideas, I just can't make them.

Your welcome to whomever feels inspired by that.

There is an issue this. Simply the fact that this is used to sync across servers. If I read off a local file, on another server the database would get a new rank and that user wouldn't get the correct rank.
HOWERVER I need to hook into when a player is given a new rank to update whenever ranks change. This would work as a much more effective way of handling the rankings.

Found the hooks that I needed and should be able to use them correctly to go about this better.

UPDATE
Most of the script is done. Once I figure out how I want to handle putting this on a server with already defined users, I will put up the new script.

Okay, I have decided that it will not accept users that were added before the MySQL was implemented. Sorry, but this is to avoid exploits that could be possible with other ways i thought of. I will upload the new GMod 13 version which I have tested. It will create a table and insert data as needed. It will also save the name in case you need it(loading screens or something?) If anyone has a better idea for avoiding exploits and loading predefined users, please shoot me a message. Other then that, happy servering.

To install MySQLOO, go here: http://facepunch.com/showthread.php?t=1220537
« Last Edit: August 23, 2013, 09:36:47 PM by MKServers »

Offline bran92don

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: ULX MySQLOO
« Reply #35 on: August 27, 2013, 03:31:50 PM »
The one issue I see with this is that, I can not edit the permission on the groups anymore.

Offline Marmaduke

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: ULX MySQLOO
« Reply #36 on: August 30, 2013, 09:35:41 AM »
Yeah, I am still missing a lot of information from my ulx menu.

Offline Organik

  • Newbie
  • *
  • Posts: 27
  • Karma: 1
    • Artifice Gaming Network
Re: ULX MySQLOO
« Reply #37 on: August 30, 2013, 07:42:29 PM »
Yeah, I am still missing a lot of information from my ulx menu.

Yikes, I don't really want to update this until that gets resolved. Any update to this MK?

Also, if I set the table to the old table made by this addon, will that cause any issues? Or should I let it create a brand new table and then migrate the data. Old table was called ulxmysql.
« Last Edit: August 30, 2013, 07:44:42 PM by Organik »

Offline MKServers

  • Newbie
  • *
  • Posts: 10
  • Karma: 3
Re: ULX MySQLOO
« Reply #38 on: August 30, 2013, 08:13:03 PM »
That is kinda awkward, my server has the exact same script and works fine, no edits form the upload except the database info. Any other things you might be able to tell me to help correct this error?

Offline Organik

  • Newbie
  • *
  • Posts: 27
  • Karma: 1
    • Artifice Gaming Network
Re: ULX MySQLOO
« Reply #39 on: August 30, 2013, 09:49:20 PM »
That is kinda awkward, my server has the exact same script and works fine, no edits form the upload except the database info. Any other things you might be able to tell me to help correct this error?

I'll give it a shot and report back in.

Offline MKServers

  • Newbie
  • *
  • Posts: 10
  • Karma: 3
Re: ULX MySQLOO
« Reply #40 on: August 31, 2013, 06:05:31 PM »
Okay, getting some issues overlooked before(still not sure about the group issues said above), working on updates now.

Offline Organik

  • Newbie
  • *
  • Posts: 27
  • Karma: 1
    • Artifice Gaming Network
Re: ULX MySQLOO
« Reply #41 on: September 05, 2013, 10:49:14 PM »
Okay, getting some issues overlooked before(still not sure about the group issues said above), working on updates now.

So, with your newest script, I get this error.

http://cl.ly/REQd

And it lists me as a "Newcomer" in the server instead of superadmin. Newcomer is my default rank.

EDIT: Also got this when playing around with my rank. http://cl.ly/RF6k
« Last Edit: September 05, 2013, 10:50:58 PM by Organik »

Offline Organik

  • Newbie
  • *
  • Posts: 27
  • Karma: 1
    • Artifice Gaming Network
Re: ULX MySQLOO
« Reply #42 on: September 12, 2013, 11:50:11 AM »
Hey Mk,

Sorry to bump this.. did you need any help with the testing of your updates? I'd be more than happy to help..

Add me on steam if you don't mind, http://steamcommunity.com/id/organik_

Thanks

Offline Braden1996

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: ULX MySQLOO
« Reply #43 on: September 20, 2013, 12:11:14 PM »
I've installed this onto my server and it creates the table in my database. But, for some reason, it doesn't add any users into the table. I'm getting no errors either. Any ideas?

Offline Mythikos

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: ULX MySQLOO
« Reply #44 on: October 12, 2013, 09:51:42 PM »
Just wanted to throw this out there, your file structure for the addon is "ulx_mysql/lua/ulx/modules/sh" which means its loading as a shared module. Downside of this is its sending the information to the client when they join the server. You may want to change the structure so ulx loads the addon in a different manor.