Applejack/Cider server help request

I have followed the available instructions for setting up an applejack server, this post is not about the jump to rejoin problem.

—Main Issue
**—Money and inventory reset on rejoin. **

I have libmysql in the same folder as srcds.
I have gmsv_mysqloo_win32 in the garrysmod/lua/bin folder
I have imported table.sql into a mysql database and that works so far as in that it will let me enter the game. Beyond the jump to reconnect screen.

The issue seems to be that either nothing is being saved in the mysql database or nothing can be loaded from it.

[01/11/17 23:55:28] Rocket.Woods [] connected to the server.
Player connected "Rocket.Woods", ( nil,
Client "Rocket.Woods" connected (
[01/11/17 23:55:36] Rocket.Woods [STEAM_0:0:26053222|] spawned for the first time this session.
[EV] Rocket.Woods last joined 3 minutes ago.
[01/11/17 23:55:36] Rocket.Woods last joined 3 minutes ago.
ServerLog: [Debug] Rocket.Woods is new to the server. Data not loaded.
ServerLog: [Teams] Rocket.Woods changed team from "Unconnected / Joining" to "Citizen".
[Teams] Rocket.Woods changed team from "Unconnected / Joining" to "Citizen".
ServerLog: [Event] Rocket.Woods finished connecting.
[Event] Rocket.Woods finished connecting.
MYSQL ERROR: Field '_Key' doesn't have a default value
Spawning textscreens...
ServerLog: [Debug] SQL Statement successful for "Rocket.Woods"
[Debug] SQL Statement successful for "Rocket.Woods"
[Rocket.Woods|2|STEAM_0:0:26053222] Lua Error:

[Rocket.Woods|2|STEAM_0:0:26053222] Lua Error:
this doesn’t even have any text paired with it :confused:

“ServerLog: [Debug] Rocket.Woods is new to the server. Data not loaded.”
This seems to be the crux of the issue, I have joined previously as it is stated in the console print from before

Here is my sv_config.lua:

	~ Serverside Config ~
	~ Applejack ~

--Remove the commented out lines
GM.Config["MySQL Host"] = "";
GM.Config["MySQL Username"] = "user";
GM.Config["MySQL Password"] = "55555";
GM.Config["MySQL Database"] = "ciderbase";
GM.Config["MySQL Table"] = "players";

this is probably related to the primary issue but I dont know how to fix

[ERROR] gamemodes/applejack/gamemode/init.lua:110: string expected, got no value

line 110 is

self.DB, err = mysqloo.connect(self.Config[“MySQL Host”], self.Config[“MySQL Username”], self.Config[“MySQL Password”], self.Config[“MySQL Database”], 3306)

full text of this section, keep in mind none of these following error warnings in the code print to my server console

-- Called when the server initializes.
function GM:Initialize()
	ErrorNoHalt(" - Server starting up
	local host = self.Config["MySQL Host"]
	local username = self.Config["MySQL Username"]
	local password = self.Config["MySQL Password"]
	local database = self.Config["MySQL Database"]

	-- Initialize a connection to the MySQL database.
	self.DB, err = mysqloo.connect(self.Config["MySQL Host"], self.Config["MySQL Username"], self.Config["MySQL Password"], self.Config["MySQL Database"], 3306)
	if (!self.DB) then
		error("You didn't setup the SQL correctly!")

Some various issues that I also do not know how to fix:
these are probably unrelated to the main issue**

  1. Voice does transmit between players and this is shown in

Unknown command "sv_voicecodec"
Unknown command "sv_voicequality"

This seems to be due to a update change in variables for gmod but I could not find documentation on the internet on how to fix this.

I’m not sure if this matters. In the table.sql key has int(11) while everything else is longtext.

  `_RPName` longtext NOT NULL,
  `_Key` int(11) NOT NULL,
  `_Name` longtext NOT NULL,

MYSQL ERROR: Field ‘_Key’ doesn’t have a default value

Thanks for your time and help, I really appreciate it.

Seems like the gamemode couldn’t connect to the database.

What version of AJ are you using?

I am using

The strange thing is that if I disable the database entirely, I will end up on the jump screen. (Which is to be expected)

But when I have the database running, it will load the players table but won’t change or save values for… wherever changes are supposed to be? Perhaps it can’t load changes? I don’t have any idea here man.

Do you have all the modules installed?

Modules as in MySQLOO V9 and libmysql then yes, I have those.

Are you home hosting the server on windows, linux or did u rent one?

I am home hosting the server and my sv_config is correct, the one I supplied is an example with only the database and table being correct.

But is it windows or linux?

windows 10

Yeah, sometimes it glitches @ windows 10. I propose you switch back to either win 7 or rent a server.

ok I used xampp and phpmyadmin and now everything works correctly

Are you kidding me?

I thought you were using xampp…