[Release] MySQL Async Library - 3.3.2

Can you make a tutorial video about installing ? If i see how do you install it could be easier for us.

4 Likes

Hi, this script fix the problem of ghost session we have with essential ? Thanks

1 Like

I did everything said in upgrade.md and readme.md. When i trying to join server says “Default ban reason error” !!! Please help me i want to use this script !!!

This errors seems not be related to this script (as it does nothing expect providing a connector mysql)

Can you make a tutorial video about installing ? If i see how do you install it could be easier for us.

There is an installation guide in the readme of this lib, i’m really bad at video and i think there is many resources existing if you need help installing a MySQL database

Hi, this script fix the problem of ghost session we have with essential ? Thanks

What do you mean by ghost session ? Normally everything is cleanup correctly before the user callback is called, also it fixes the double query that was having essential (There should be no more DbDataReader already present that was happening)

2 Likes

@Brouznouf With essential there are a bug, sometime split session and all player are alone one the map

1 Like

Sorry guys but is anybody able to explain for send a snippet of code on how to insert into a DB using this i have tried various things non of which are working.

1 Like

Hi Community, Today i need some help here is the error i have in my server:


I cannot get this working and am unsure where i am going wrong, here is my code:

Any Help Appreciated

1 Like

Ok, now everything work ! But when i type setgroup 1 owner / setadmin im getting this error

1 Like

With essential there are a bug, sometime split session and all player are alone one the map

If this was caused because of the locking the main thread, then the library should help here, as long as you use the async functions and not the sync one.

Hi Community, Today i need some help here is the error i have in my server:

It’s say clearly in the log that it cannot connect to any of the server, did you set the config for your server (user / password / host / port) ? is this config good ?

Ok, now everything work ! But when i type setgroup 1 owner / setadmin im getting this error

There is a change compared to before where you will do this in your query :

SELECT * FROM test WHERE id = '@id'

Note the quote here, now this library use only the function provided by the underlying connector to do parameter replacement which will treat ‘@id’ as a value, if you want to treat this as a parameter you should remove the quote:

SELECT * FROM test WHERE id = @id
1 Like

I tried to remove quotes but it didn’t work. What i need to do, here are screenshots.

1 Like
UPDATE users SET @key=@value WHERE identifier = @identifier

But be warned, if @key is a reserved word from mysql it will not work (like group / user / order / …)

1 Like

I seem to be getting a “es:getPlayerFromId” error since setting up Async.

We’ve checked everything and all other mods are working fine, any ideas?

1 Like

Good afternoon,

Is there any way to specify a custom port in the config for example:

MySQL.Config.Host = '127.0.0.1'
MySQL.Config.Port = '5983'

Thanks

1 Like

Oups, option not available, will add it in the next release :),

In the meantime, you can update lib/MySQL.lua and add ;port=3310 (if you run mysql on the 3310 port) where it create the connection settings by using the string.

1 Like

That’s great thank you :stuck_out_tongue: sorry this is what was causing my connection error originally cant believe i didn’t see that earlier.

I have just modified the MySQL.lua and the config to work the same way you have set it up if you wanted a copy to save you time so you can just upload as a revision?

1 Like

WoW Nice all works perfectly for me but:

It’s appear only when someone is connecting xD

1 Like

Hello, i have a new problem as shown below:


and here is my code:

For the life of me i cannot work out why i am getting this error:
“exception has been thrown by the target of an invocation”
and:
“Inner Exception: Object is nil”

as you can see from my server log / console it shows all the values and they are not null.

1 Like

try to remove quotes between transication_log and VALUES like (identifier, from, desc, amount, balance)
if didn’t work try to delete other ( ’ )s, not this ( " )s

1 Like

Thank you for your reply,
Unfortunately this isn’t working either, any other suggestions?

1 Like

What is my error ?

MySQL.Sync.execute("CREATE TABLE IF NOT EXISTS `players` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `steamId` varchar(255) DEFAULT NULL,
  `ban` tinyint(1) NOT NULL DEFAULT '0',
  `whitelist` tinyint(1) NOT NULL DEFAULT '0',
  `permissionLevel` int(1) NOT NULL DEFAULT '0',
  `role` int(1) NOT NULL DEFAULT '0',
  `createdAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `steamId` (`steamId`)
);")

2 Likes

Try just making your table manually? create a .sql file if your looking to release ?

I know its not a fix but it is a possible solution to see if the rest of your script works.

1 Like