Mysql makes people loose there points on Pointshop

there were people talking about it and i set it up correctly but for some reason there points do not stay

Anyone know how to fix it?

http://forum.facepunch.com/showthread.php?t=1299005

im not sure how im suppost to add the information for my database

sv_player_extension.lua

The second bit of code is only if you’re using tmysql4

yeh but will it sync the pointshop points to my other servers

Well give it a try; just make sure to backup your current file. I’m not sure if it works cross-server.

Yes it does work cross server.

I tried to use it but im prolly doing it wrong

Probably. If you are in doubt, you should post how you are probably using it wrong, otherwise we probably can’t help you.

I edited the
sv_player_extension

but im not sure i edited the mysql right

this is what my mysql looks like


--[[

	PointShop MySQL Adapter by _Undefined
	
	Usage:
	
		First, make sure you have the MySQLOO module installed from:
			http://www.facepunch.com/showthread.php?t=1220537
			Installation instructions are in that thread.
	
		Then configure your MySQL details below and import the tables into your
			database using the provided sql file. If you do not have a database
			already set up, do that before importing the file.
		
		MAKE SURE YOU ALLOW REMOTE ACCESS TO YOUR DATABASE FROM YOUR GMOD SERVERS IP ADDRESS.
		
		If you're upgrading from the old version, run the following SQL before starting your server and then remove the old tables (pointshop_points and pointshop_items):
		
			INSERT INTO `pointshop_data` SELECT `pointshop_points`.`uniqueid`, `points`, `items` FROM `pointshop_points` INNER JOIN `pointshop_items` ON `pointshop_items`.`uniqueid` = `pointshop_points`.`uniqueid`
		
		Once configured, change PS.Config.DataProvider = 'pdata' to PS.Config.DataProvider = 'mysql' in pointshop's sh_config.lua.
	
]]--
 -- Not actual info
local mysql_hostname = 'bla' -- Your MySQL server address.
local mysql_username = 'bla' -- Your MySQL username.
local mysql_password = 'bla' -- Your MySQL password.
local mysql_database = 'bla' -- Your MySQL database.
local mysql_port = 3306 -- Your MySQL port. Most likely is 3306.

-- end config, don't change anything below unless you know what you're doing

local shouldmysql = true

PROVIDER.Fallback = 'pdata'

function PROVIDER:GetData(ply, callback)
    if not shouldmysql then self:GetFallback():GetData(ply, callback) end
     GetDBConnection():Query("SELECT * FROM pointshop_data WHERE uniqueid = '" .. tmysql.escape(ply:UniqueID()) .. "'", function(result)
            if (result and type(result) == "table" and #result > 0) then
                    local row = result[1]
                    local points = row.points or 0
                    local items = util.JSONToTable(row.items or '{}')
                    callback(points, items)
            else
                    callback(0, {})
            end
        end, 1);
end
 
function PROVIDER:SetData(ply, points, items)
    if not shouldmysql then self:GetFallback():SetData(ply, points, items) end
    GetDBConnection():Query("INSERT INTO `pointshop_data` (uniqueid, points, items) VALUES ('" .. tmysql.escape(ply:UniqueID()) .. "', '" .. (points or 0) .. "', '" .. tmysql.escape(util.TableToJSON(items or {})) .. "') ON DUPLICATE KEY UPDATE points = VALUES(points), items = VALUES(items)")
end

And can you make a MySQL dump of the structure of your database?

um let me try

[editline]18th August 2013[/editline]

I believe thats what you want

[editline]18th August 2013[/editline]

ok i found the issue